PKGBUILD/pkg/types/pressure.go

65 lines
1.5 KiB
Go

package types
import (
"time"
)
// Pressure ...
type Pressure struct {
PressureID string `json:"pressure_id" xml:"pressure_id"`
PressureValue float64 `json:"pressure_value,string" xml:"pressure_value,string"`
PressureFromDate time.Time `json:"pressure_from_date" xml:"pressure_from_date"`
PressureTillDate time.Time `json:"pressure_till_date" xml:"pressure_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"`
}
func (t *Pressure) GetID() string {
return t.PressureID
}
func (t *Pressure) GetValue() float64 {
return t.PressureValue
}
func (t *Pressure) GetFromDate() time.Time {
return t.PressureFromDate
}
func (t *Pressure) GetTillDate() time.Time {
return t.PressureTillDate
}
func (t *Pressure) GetSensorID() string {
return t.SensorID
}
func (t *Pressure) GetCreationDate() *time.Time {
return t.CreationDate
}
func (t *Pressure) GetUpdateDate() *time.Time {
return t.UpdateDate
}
func (t *Pressure) GetMeasuredValueType() MeasuredValueType {
return MeasuredValueTypePressure
}
func (t *Pressure) SetValue(value float64) {
t.PressureValue = value
}
func (t *Pressure) SetTillDate(date time.Time) {
t.PressureTillDate = date
}
func (t *Pressure) SetCreationDate(date *time.Time) {
t.CreationDate = date
}
func (t *Pressure) SetUpdateDate(date *time.Time) {
t.UpdateDate = date
}