29 lines
694 B
Go
29 lines
694 B
Go
|
package mqtt
|
||
|
|
||
|
import "joylink.club/iot/mqtt/proto"
|
||
|
|
||
|
type IotServiceStateHandler func(state *proto.IotServiceState)
|
||
|
|
||
|
type IotService interface {
|
||
|
PubIotServiceState(state *proto.IotServiceState)
|
||
|
PubIotQdData(qd *proto.IotQd)
|
||
|
SubIotQd()
|
||
|
RegIotQd(h func(qd *proto.IotQd))
|
||
|
PubIotCjData(cj *proto.IotCj)
|
||
|
SubIotCj()
|
||
|
RegIotCj(h func(cj *proto.IotCj))
|
||
|
SubIotReq(cmd *proto.IotServiceReq)
|
||
|
}
|
||
|
|
||
|
type Service interface {
|
||
|
SubIotServiceState()
|
||
|
RegIotServiceState(h func(state *proto.IotServiceState))
|
||
|
PubIotQdData(qd *proto.IotQd)
|
||
|
SubIotQd()
|
||
|
RegIotQd(h func(qd *proto.IotQd))
|
||
|
PubIotCjData(cj *proto.IotCj)
|
||
|
SubIotCj()
|
||
|
RegIotCj(h func(cj *proto.IotCj))
|
||
|
ReqIotService(cmd *proto.IotServiceReq)
|
||
|
}
|