Versions in this module Expand all Collapse all v1 v1.0.0 Sep 7, 2022 Changes in this version + func InterfaceToBytes(key interface{}) ([]byte, error) + func Register(name string, c Codec) + type Codec interface + Decode func(ctx context.Context, msg DeviceData) (interface{}, error) + Encode func(ctx context.Context, rawData interface{}) (*DeviceDecodeMsg, error) + Save func(ctx context.Context, dmesg *DeviceDecodeMsg) error + func HttpCodec() Codec + func MqttCodec() Codec + func Open(name string) (Codec, error) + type DeviceData struct + CategoryId int + Data interface{} + Name string + Ratio string + Time *gtime.Time + Type int + type DeviceDecodeMsg struct + func (d *DeviceDecodeMsg) GetDataList() []*DeviceData + func (d *DeviceDecodeMsg) GetDeviceInfo() *model.DeviceAllInfo + func (d *DeviceDecodeMsg) GetEventList() []*DeviceEvent + type DeviceEvent struct + Data interface{} + Name string