models

package
v0.0.0-...-6f9a9ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL