Versions in this module Expand all Collapse all v0 v0.2.0 Oct 24, 2022 v0.1.0 Oct 23, 2022 Changes in this version + func GenThingDeviceRespData(Method, ClientToken string, topics []string, err error, data map[string]any) (topic string, payload []byte) + func GetVal(d *schema.Define, val any) (any, error) + func ToVal(tp map[string]TempParam) map[string]any + type DeviceReq struct + ActionID string + ClientToken string + Code int64 + EventID string + Method string + Params map[string]any + Showmeta int64 + Status string + Timestamp int64 + Type string + Version string + func (d *DeviceReq) GetTimeStamp(defaultTime time.Time) time.Time + func (d *DeviceReq) VerifyReqParam(t *schema.Model, tt schema.ParamType) (map[string]TempParam, error) + func (d DeviceReq) AddStatus(err error) DeviceReq + type DeviceResp struct + ClientToken string + Code int64 + Data map[string]any + Method string + Response map[string]any + Status string + Timestamp int64 + Type string + Version string + func (d *DeviceResp) GetTimeStamp(defaultTime time.Time) time.Time + func (d *DeviceResp) VerifyRespParam(t *schema.Model, id string, tt schema.ParamType) (map[string]TempParam, error) + func (d DeviceResp) AddStatus(err error) DeviceResp + type Method = string + const Action + const ActionReply + const Control + const ControlReply + const EventPost + const EventReply + const GetStatus + const GetStatusReply + const Report + const ReportInfo + const ReportInfoReply + const ReportReply + const UnbindDevice + func GetMethod(method Method) Method + type TempParam struct + Desc string + Identifier string + Mode schema.PropertyMode + Name string + Required bool + Type schema.EventType + Value struct{ ... } + func (t *TempParam) AddDefine(d *schema.Define, val any) (err error) + func (t *TempParam) ToVal() any