This commit is contained in:
Michael Lehmann
2025-02-18 21:06:52 +01:00
parent da6b2ec0ef
commit 088a15975c
13 changed files with 361 additions and 0 deletions

24
config/data.go Normal file
View File

@@ -0,0 +1,24 @@
package config
// Config bildet die Struktur der YAML-Konfiguration ab.
type Config struct {
Defaults Defaults `yaml:"defaults"`
Groups map[string]GroupDef `yaml:"groups"`
}
// Defaults enthält Standardwerte.
type Defaults struct {
Temperatur int `yaml:"temperatur"`
Dimming int `yaml:"dimming"`
}
// GroupDef enthält die Details einer Gruppe, in diesem Fall eine Liste von Bulps.
type GroupDef struct {
Bulps []Bulp `yaml:"bulps"`
}
// Bulp repräsentiert ein einzelnes Gerät.
type Bulp struct {
IP string `yaml:"ip"`
Port string `yaml:"port"`
}