PKGBUILD/pkg/types/measuredValue.go

32 lines
667 B
Go
Raw Normal View History

package types
import "time"
type MeasuredValue interface {
GetID() string
GetMeasuredValueType() MeasuredValueType
GetValue() float64
GetFromDate() time.Time
GetTillDate() time.Time
GetSensorID() string
GetCreationDate() *time.Time
GetUpdateDate() *time.Time
SetValue(value float64)
SetTillDate(date time.Time)
SetCreationDate(date *time.Time)
SetUpdateDate(date *time.Time)
}
type MeasuredValueType string
const (
MeasuredValueTypeHumidity MeasuredValueType = "humidity"
MeasuredValueTypeTemperature MeasuredValueType = "temperature"
)
var MeasuredValueTypes = []MeasuredValueType{
MeasuredValueTypeHumidity,
MeasuredValueTypeTemperature,
}