Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Measurement ¶
type Measurement struct { Name MeasurementType `json:"name"` Value float64 `json:"value"` }
type MeasurementType ¶
type MeasurementType string
const ( // TODO: maybe change this to parameter? // MeasurementTypePH is a MeasurementType for the pH level of the water. MeasurementTypePH MeasurementType = "ph" // MeasurementTypeDO is a MeasurementType for the concentration of oxygen that is dissolved in the water (Dissolved Oxygen). MeasurementTypeDO MeasurementType = "do" // MeasurementTypeTMP is a MeasurementType for the temperature of the water. MeasurementTypeTMP MeasurementType = "tmp" // MeasurementTypeTDY is a MeasurementType for the turbidity of the water. MeasurementTypeTDY MeasurementType = "ty" // MeasurementTypeTDS is a MeasurementType for the total dissolved solid (TDS) of the water. MeasurementTypeTDS MeasurementType = "tds" // MeasurementTypeLat is a MeasurementType for the latitude of the module location. MeasurementTypeLat MeasurementType = "lat" // MeasurementTypeLng is a MeasurementType for the longitude of the module location. MeasurementTypeLng MeasurementType = "lng" )
type Message ¶
type Message struct { ID string `json:"id"` Date time.Time `json:"date"` ModuleID string `json:"moduleID"` RiverID string `json:"riverID"` PhoneNumber string `json:"phoneNumber"` MessageType MessageType `json:"messageType"` Measurements []Measurement `json:"measurements,omitempty"` }
type MessageType ¶
type MessageType string
const (
MessageTypeMeasurement MessageType = "measurement"
)
Click to show internal directories.
Click to hide internal directories.