service

package
v0.0.0-...-67d91c4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Interactive

func Interactive(data *model.CmdData, client model.Client) (device *model.Device)

func Into

func Into(client model.Client, deviceId string) (device *model.Device)

func NewTopic

func NewTopic(topicName string) (err error)

func TopicAddDevice

func TopicAddDevice(topicName, device string) (err error)

func TopicDelDevice

func TopicDelDevice(topicName, device string) (err error)

func TopicDisconnectionDevice

func TopicDisconnectionDevice(topicName string) (err error)

func TopicIsHave

func TopicIsHave(topicName string) bool

func TopicSend

func TopicSend(topicName, msg string) (err error)

Types

type GetTopicSendBody

type GetTopicSendBody struct {
	List  []*TopicMsgData `json:"list"`
	Count int64           `json:"count"`
	Page  int64           `json:"page"`
	Limit int64           `json:"limit"`
}

返回的 获取推送数据

func GetTopicSend

func GetTopicSend(topicName string, page, limit int64) (data *GetTopicSendBody, err error)

获取推送数据

type TopicMsgData

type TopicMsgData struct {
	Message  string `bson:"message"`
	SendTime string `bson:"send_time"`
}

Jump to

Keyboard shortcuts

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