PKGBUILD/pkg/types/measuredValue.go

31 lines
642 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
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,
}