1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-27 13:48:49 +08:00
Manuel Imperiale 7a18d3fa56
MF-1088 - Remove message payload content type (#1121)
* MF-1088 - Remove message payload content type

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add default contentFormat

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-04-21 19:33:11 +02:00

19 lines
740 B
Go

package senml
// Message represents a resolved (normalized) SenML record.
type Message struct {
Channel string `json:"channel,omitempty"`
Subtopic string `json:"subtopic,omitempty"`
Publisher string `json:"publisher,omitempty"`
Protocol string `json:"protocol,omitempty"`
Name string `json:"name,omitempty"`
Unit string `json:"unit,omitempty"`
Time float64 `json:"time,omitempty"`
UpdateTime float64 `json:"update_time,omitempty"`
Value *float64 `json:"value,omitempty"`
StringValue *string `json:"string_value,omitempty"`
DataValue *string `json:"data_value,omitempty"`
BoolValue *bool `json:"bool_value,omitempty"`
Sum *float64 `json:"sum,omitempty"`
}