fix(pkg/sensor): temperature measurement unit
This commit is contained in:
		| @@ -8,9 +8,24 @@ import ( | ||||
| type Temperature struct { | ||||
| 	TemperatureID       string     `json:"temperature_id" xml:"temperature_id"` | ||||
| 	TemperatureValue    float64    `json:"temperature_value,string" xml:"temperature_value,string"` | ||||
| 	TemperatureDegree   Degree     `json:"temperature_degree" xml:"temperature_degree"` | ||||
| 	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"` | ||||
| } | ||||
|  | ||||
| // 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" | ||||
| ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user