Add federation settings

This commit is contained in:
nemunaire 2024-07-25 18:53:00 +02:00
commit 3a6187d791
4 changed files with 91 additions and 7 deletions

View file

@ -6,14 +6,19 @@ import (
"time"
)
type FederationSettings struct {
URL string `json:"url"`
}
// Settings represents the settings panel.
type Settings struct {
Language string `json:"language"`
GongInterval time.Duration `json:"gong_interval"`
WeatherDelay time.Duration `json:"weather_delay"`
WeatherAction string `json:"weather_action"`
MaxRunTime time.Duration `json:"max_run_time"`
MaxVolume uint16 `json:"max_volume"`
Language string `json:"language"`
GongInterval time.Duration `json:"gong_interval"`
WeatherDelay time.Duration `json:"weather_delay"`
WeatherAction string `json:"weather_action"`
MaxRunTime time.Duration `json:"max_run_time"`
MaxVolume uint16 `json:"max_volume"`
Federation map[string]FederationSettings `json:"federation"`
}
// ExistsSettings checks if the settings file can by found at the given path.