iotclient

package
v0.0.0-...-05843c7 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2016 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMqttClientOpts

func GetMqttClientOpts(serverAddress string) *MQTT.ClientOptions

func InitClient

func InitClient(newClientInfo ClientInfoStruct)

Types

type AuthResponseStruct

type AuthResponseStruct struct {
	Servers   string `json:"servers"`
	Pubkey    string `json:"pubkey"`
	PkVersion string `json:"pkVersion"`
	DeviceID  string `json:"deviceId"`
	Success   bool   `json:"success"`
	Sign      string `json:"sign"`
	ErrorCode string `json:"errorCode"`
	Message   string `json:"message"`
}

func IotAuth

func IotAuth() *AuthResponseStruct

func (*AuthResponseStruct) GetServerAddress

func (s *AuthResponseStruct) GetServerAddress() string

func (*AuthResponseStruct) IsSuccess

func (s *AuthResponseStruct) IsSuccess() bool

type ClientInfoStruct

type ClientInfoStruct struct {
	ProductKey  string `json:"productKey"`
	DeviceID    string `json:"deviceId"`
	DeviceName  string `json:"deviceName"`
	Sign        string `json:"sign"`
	UserNameMD5 string
}

Jump to

Keyboard shortcuts

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