models

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageEnvelope

type MessageEnvelope struct {
	// Payload is byte representation of the data being transferred.
	Payload []byte `json:"payload"`
	// ReceivedTopic is the topic that the message was received on.
	ReceivedTopic string `json:"receivedTopic"`
	// ContentType is the marshaled type of payload, i.e. application/json, application/xml, application/cbor, etc
	ContentType string `json:"contentType"`
	// CorrelationID is an object id to identify the envelope.
	CorrelationID string `json:"correlationID"`
}

MessageEnvelope is the data structure for messages. It wraps the generic message payload with attributes.

func NewMessageEnvelope added in v1.0.5

func NewMessageEnvelope(payload []byte, ctx context.Context) MessageEnvelope

NewMessageEnvelope creates a new MessageEnvelope for the specified payload with attributes from the specified context

type Mqtt5Config

type Mqtt5Config struct {
	// hostname_rfc1123 refers to https://github.com/go-playground/validator/blob/94a637ab9fbbb0bc0fe8a278f0352d0b14e2c365/regexes.go#L52C22-L52C22
	Host       string `validate:"required,ip|hostname_rfc1123"`
	Port       int    `validate:"required"`
	Protocol   string `validate:"required"`
	AuthMode   string
	SecretName string
	ClientID   string // Client ID to use when connecting to server
	QoS        int    // QOS to use when publishing
	KeepAlive  uint16 // seconds between keepalive packets
	CleanStart bool
	Topics     map[string]string
}

Jump to

Keyboard shortcuts

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