protocol

package
v0.1.0-M4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: Apache-2.0, EPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const Group = "things"

Group is a representation of the topic group things

View Source
const TopicErrorsFormat = "unknown/unknown/" + string(Group) + "/%s/" + string(Errors)

TopicErrorsFormat is a representation of the topic error format

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	Topic     string      `json:"topic"`
	Headers   Headers     `json:"headers"`
	Path      string      `json:"path"`
	Value     interface{} `json:"value,omitempty"`
	Status    int         `json:"status,omitempty"`
	Revision  int         `json:"revision,omitempty"`
	Timestamp string      `json:"timestamp,omitempty"`
}

Envelope represents the content of the messages

type Headers

type Headers interface {
	GetCorrelationID() string
	IsResponseRequired() bool
	GetChannel() string
	IsDryRun() bool
	GetOrigin() string
	GetOriginator() string
	GetETag() string
	GetIfMatch() string
	GetIfNoneMatch() string
	GetReplyTarget() int64
	GetReplyTo() string
	GetVersion() int64
	GetContentType() string
	GetGeneric(id string) interface{}
	ToMap() map[string]interface{}
}

Headers represents the headers in the protocol messages

type TopicAction

type TopicAction string

TopicAction is a representation of the defined topic action options

const (
	ActionCreate   TopicAction = "create"
	ActionCreated  TopicAction = "created"
	ActionModify   TopicAction = "modify"
	ActionModified TopicAction = "modified"
	ActionDelete   TopicAction = "delete"
	ActionDeleted  TopicAction = "deleted"
	ActionRetrieve TopicAction = "retrieve"
)

contants for the supported topic action options

type TopicChannel

type TopicChannel string

TopicChannel is a representation of the defined topic channel options

const (
	Twin TopicChannel = "twin"
	Live TopicChannel = "live"
)

constants for the supported topic channel options

type TopicCriterion

type TopicCriterion string

TopicCriterion is a representation of the defined topic creation options

const (
	Commands TopicCriterion = "commands"
	Events   TopicCriterion = "events"
	Search   TopicCriterion = "search"
	Messages TopicCriterion = "messages"
	Errors   TopicCriterion = "errors"
)

constants for the supported topic creation options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL