aboutsummaryrefslogtreecommitdiff
path: root/inform/tx_messages.go
diff options
context:
space:
mode:
Diffstat (limited to 'inform/tx_messages.go')
-rw-r--r--inform/tx_messages.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/inform/tx_messages.go b/inform/tx_messages.go
new file mode 100644
index 0000000..5efddd6
--- /dev/null
+++ b/inform/tx_messages.go
@@ -0,0 +1,28 @@
1package inform
2
3type AdminMetadata struct {
4 Id string `json:"_id"`
5 Language string `json:"lang"`
6 Username string `json:"name"`
7 Password string `json:"x_password"`
8}
9
10// TODO: Convert string time to time.Time
11type CommandMessage struct {
12 Metadata *AdminMetadata `json:"_admin"`
13 Id string `json:"_id"`
14 Type string `json:"_type"` // cmd
15 Command string `json:"cmd"` // mfi-output
16 DateTime string `json:"datetime"` // 2016-07-28T01:17:55Z
17 DeviceId string `json:"device_id"`
18 MacAddress string `json:"mac"`
19 Model string `json:"model"`
20 OffVoltage int `json:"off_volt"`
21 Port int `json:"port"`
22 MessageId string `json:"sId"` // ??
23 ServerTime string `json:"server_time_in_utc"`
24 Time string `json:"time"`
25 Timer int `json:"timer"`
26 Value int `json:"val"`
27 Voltage int `json:"volt"`
28}