29 lines
664 B
Go
29 lines
664 B
Go
package logger
|
|
|
|
import (
|
|
"time"
|
|
|
|
"git.cryptic.systems/fh-trier/go-flucky/pkg/types"
|
|
)
|
|
|
|
type Logger interface {
|
|
GetHumidities(fromDate *time.Time, tillDate *time.Time, sensorNameOrUUID *[]string) ([]*types.Humidity, error)
|
|
GetTemperatures(fromDate *time.Time, tillDate *time.Time, sensorNameOrUUID *[]string) ([]*types.Temperature, error)
|
|
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"
|
|
)
|