device

package
v0.0.0-...-921d693 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPair

type KeyPair struct {
	PrivateKeyPath    string
	CertificatePath   string
	CACertificatePath string
}

KeyPair the structure contains the path to the AWS MQTT credentials

type Shadow

type Shadow []byte

Shadow device shadow data

type Thing

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

Thing a structure for working with the AWS IoT device shadows

func NewThing

func NewThing(keyPair KeyPair, awsEndpoint string, thingName ThingName) (*Thing, error)

NewThing returns a new instance of Thing

func (*Thing) GetThingShadow

func (t *Thing) GetThingShadow() (Shadow, error)

GetThingShadow gets the current thing shadow

func (*Thing) SubscribeForThingShadowChanges

func (t *Thing) SubscribeForThingShadowChanges(topic string) (chan Shadow, error)

SubscribeForThingShadowChanges returns the channel with the shadow updates

func (*Thing) UpdateThingShadow

func (t *Thing) UpdateThingShadow(topic string, payload Shadow) error

UpdateThingShadow publish a message with new thing shadow

type ThingName

type ThingName string

ThingName the name of the AWS IoT device representation

Jump to

Keyboard shortcuts

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