iot

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 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 Client

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

func CreateClient

func CreateClient(accessKeyId string, accessKeySecret string) (*Client, error)

func (*Client) GetDeviceShadow

func (c *Client) GetDeviceShadow(productKey string, deviceName string) (*ShadowMessage, error)

func (*Client) UpdateDeviceShadow

func (c *Client) UpdateDeviceShadow(productKey string, deviceName string, desired interface{}, version int, delta bool) (bool, error)

func (*Client) UpdateDeviceShadowEx

func (c *Client) UpdateDeviceShadowEx(productKey string, deviceName string, desired interface{}, delta bool) (bool, error)

type ShadowMessage

type ShadowMessage struct {
	State struct {
		Desired json.RawMessage `json:"desired"`
	} `json:"state"`
	Metadata struct {
		Desired json.RawMessage `json:"desired"`
	} `json:"metadata"`
	Timestamp int64 `json:"timestamp"`
	Version   int   `json:"version"`
}

Jump to

Keyboard shortcuts

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