You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
715 B

7 years ago
package main
// Device struct for store device data from iot-item table
type Device struct {
Device string `json:"device"`
Name string `json:"name"`
}
// Create structs to hold info about new item
type ItemInfo struct {
Firmware string `json:"firmware"`
Sensor string `json:"sensor"`
}
type ItemFloraData struct {
Battery int `json:"battery"`
Light int `json:"light"`
Conductivity float32 `json:"conductivity"`
Moisture float32 `json:"moisture"`
Temperature float32 `json:"temperature"`
}
type Item struct {
Device string `json:"device"`
Timestamp string `json:"timestamp"`
Info ItemInfo `json:"info"`
Data ItemFloraData `json:"data"`
}