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"` }