PKGBUILD/pkg/logger/logger.go

29 lines
648 B
Go
Raw Normal View History

2019-03-04 09:45:00 +00:00
package logger
import (
2019-03-04 16:45:46 +00:00
"time"
2019-03-04 09:45:00 +00:00
"git.cryptic.systems/fh-trier/go-flucky/pkg/types"
)
type Logger interface {
2019-03-04 16:45:46 +00:00
GetHumidities(fromDate *time.Time, tillDate *time.Time, sensorNameOrUUID *[]string) ([]*types.Humidity, error)
2019-03-04 16:56:49 +00:00
GetTemperatures(from *time.Time, till *time.Time, sensorIDs []string) ([]*types.Temperature, error)
2019-03-04 09:45:00 +00:00
LogHumidities(humidities []*types.Humidity) error
LogTemperatures(temperatures []*types.Temperature) error
}
type LoggerType string
const (
LogFile LoggerType = "file"
LogRemote = "remote"
)
type LogValue string
const (
LogHumidity LogValue = "humidity"
LogTemperature = "temperature"
)