iotserver

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitServer

func InitServer(newconfig ConfigStruct)

Types

type BaseResponseStruct

type BaseResponseStruct struct {
	RequestID string `json:"RequestId"`
	Success   bool   `json:"Success"`
	Code      string `json:"Code"`
	HostID    string `json:"HostId"`
	Message   string `json:"Message"`
}

func CancelSubTopicRequest

func CancelSubTopicRequest(productKey string, topics ...string) *BaseResponseStruct

func PubMessageToTopicRequest

func PubMessageToTopicRequest(productKey string, message string, topicFullName string, Qos int) *BaseResponseStruct

func ServerOnlineRequest

func ServerOnlineRequest(productKey string) *BaseResponseStruct

func SubTopicRequest

func SubTopicRequest(productKey string, subCallback string, topics ...string) *BaseResponseStruct

type ConfigStruct

type ConfigStruct struct {
	AccessKeyID     string
	AccessKeySecret string
}

type DevicePermitStruct

type DevicePermitStruct struct {
	ErrorMessage string `json:"ErrorMessage"`
	ID           int    `json:"id"`
	BaseResponseStruct
}

func GrantDeviceRequest

func GrantDeviceRequest(productKey string, deviceName string, grantType string, topicFullName string) *DevicePermitStruct

func ModifyDevicePermitByTopicRequest

func ModifyDevicePermitByTopicRequest(productKey string, deviceName string, grantType string, topicFullName string) *DevicePermitStruct

func ModifyDevicePermitRequest

func ModifyDevicePermitRequest(productKey string, deviceName string, ruleID string, grantType string, topicFullName string) *DevicePermitStruct

func RemoveDevicePermitByIDRequest

func RemoveDevicePermitByIDRequest(productKey string, deviceName string, ruleID string) *DevicePermitStruct

type DevicePermitsStruct

type DevicePermitsStruct struct {
	DevicePermissions struct {
		DevicePermission []struct {
			GrantType     string `json:"GrantType"`
			ID            int    `json:"Id"`
			TopicFullName string `json:"TopicFullName"`
			TopicUserID   int    `json:"TopicUserId"`
		} `json:"DevicePermission"`
	} `json:"DevicePermissions"`
	BaseResponseStruct
}

func GetDevicePermitsRequest

func GetDevicePermitsRequest(productKey string, deviceName string) *DevicePermitsStruct

type RegisterDeviceStruct

type RegisterDeviceStruct struct {
	DeviceID     string `json:"DeviceId"`
	DeviceName   string `json:"DeviceName"`
	DeviceSecret string `json:"DeviceSecret"`
	DeviceStatus string `json:"DeviceStatus"`
	ErrorMessage string `json:"ErrorMessage"`
	BaseResponseStruct
}

func RegisterDeviceRequest

func RegisterDeviceRequest(productKey string, deviceName string) *RegisterDeviceStruct

func (*RegisterDeviceStruct) GetClientInfoStruct

func (s *RegisterDeviceStruct) GetClientInfoStruct(productKey string, productSecret string) iotclient.ClientInfoStruct

Jump to

Keyboard shortcuts

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