2019-02-28 18:48:25 +00:00
|
|
|
package types
|
|
|
|
|
2019-06-21 11:37:29 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
2019-02-28 18:48:25 +00:00
|
|
|
|
|
|
|
// Temperature ...
|
|
|
|
type Temperature struct {
|
2019-06-19 17:18:01 +00:00
|
|
|
TemperatureID string `json:"temperature_id" xml:"temperature_id"`
|
|
|
|
TemperatureValue float64 `json:"temperature_value,string" xml:"temperature_value,string"`
|
2019-06-23 11:33:09 +00:00
|
|
|
TemperatureDegree Degree `json:"temperature_degree" xml:"temperature_degree"`
|
2019-06-19 17:18:01 +00:00
|
|
|
TemperatureFromDate time.Time `json:"temperature_from_date" xml:"temperature_from_date"`
|
|
|
|
TemperatureTillDate time.Time `json:"temperature_till_date" xml:"temperature_till_date"`
|
|
|
|
SensorID string `json:"sensor_id" xml:"sensor_id"`
|
|
|
|
CreationDate *time.Time `json:"creation_date" xml:"creation_date"`
|
|
|
|
UpdateDate *time.Time `json:"update_date" xml:"update_date"`
|
2019-02-28 18:48:25 +00:00
|
|
|
}
|
2019-06-23 11:33:09 +00:00
|
|
|
|
|
|
|
// Degree unit of measurement for temperature
|
|
|
|
type Degree string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// DegreeCelsius indicates the temperature in Celsius
|
|
|
|
DegreeCelsius Degree = "celsius"
|
|
|
|
|
|
|
|
// DegreeFahrenheit indicates the temperature in Fahrenheit
|
|
|
|
DegreeFahrenheit = "fahrenheit"
|
|
|
|
|
|
|
|
// DegreeKelvin indicates the temperature in Kelvin
|
|
|
|
DegreeKelvin = "kelvin"
|
|
|
|
)
|