parser/data/type.go

28 lines
405 B
Go
Raw Normal View History

2018-06-19 15:20:02 +02:00
package data
import "time"
// Source is a source of power quality data
type Source uint8
// All known source
const (
SourceFortop = iota + 1
SourceEnvitron
)
func (s Source) String() string {
return []string{``, `Fortop`, `Envitron`}[s]
}
// Sets are multiple sets of date
type Sets map[Key]Set
// Set is a set of data
type Set map[string]float64
type Key struct {
Time time.Time
Meter int
}