...

Package model

import "edge-infra.dev/pkg/edge/datasync/chirp/model"
Overview
Index

Overview ▾

type Message

Message represents all information about a message. TenantID and OrganizationName are the same. TenantID will be deprecated in favor of the better named OrganizationName

type Message struct {
    ID               uuid.UUID
    Type             string
    FilePath         string
    Payload          []byte
    TenantID         string
    OrganizationName string
    OrganizationID   string
    SiteID           string
    SiteName         string
    CreatedAt        time.Time
    Signature        string
}

type MessageData

type MessageData struct {
    ID      uuid.UUID
    Type    string
    Payload []byte
}

type MessageMetadata

MessageMetadata represents the message meta-data. TenantID/organization will be deprecated in favor of a better named Organization/organization_name

type MessageMetadata struct {
    MessageType      string    `json:"type"`
    TenantID         string    `json:"organization"`
    OrganizationID   string    `json:"organization_id"`
    OrganizationName string    `json:"organization_name"`
    SiteID           string    `json:"site_id"`
    SiteName         string    `json:"site_name"`
    CreatedAt        time.Time `json:"created"`
    Signature        string    `json:"signature"`
}

type MessagePair

MessagePair is a pair of os.FileInfo, one for the message meta-data and the other is the message payload

type MessagePair struct {
    Metadata os.FileInfo
    Payload  os.FileInfo
}