messaging

package
v0.0.0-...-9f6bc17 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName string
	Host        string
	User        string
	Password    string
}

type Context

type Context struct {
	// contains filtered or unexported fields
}

func Initialize

func Initialize(cfg Config) (*Context, error)

func (*Context) Close

func (ctx *Context) Close()

func (*Context) PublishOnTopic

func (ctx *Context) PublishOnTopic(message TopicMessage) error

type Error

type Error struct {
	// contains filtered or unexported fields
}

func (*Error) Error

func (err *Error) Error() string

type IoTHubMessage

type IoTHubMessage struct {
	Origin    IoTHubMessageOrigin `json:"origin"`
	Timestamp string              `json:"timestamp"`
}

type IoTHubMessageOrigin

type IoTHubMessageOrigin struct {
	Device    string  `json:"device"`
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type TopicMessage

type TopicMessage interface {
	ContentType() string
	TopicName() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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