Refactor federation + can sync track between instances
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2024-07-30 10:59:14 +02:00
commit c8c6282216
6 changed files with 318 additions and 54 deletions

View file

@ -6,20 +6,15 @@ import (
"time"
)
type FederationSettings struct {
URL string `json:"url"`
Delay uint `json:"delay"`
}
// 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"`
Federation map[string]FederationSettings `json:"federation"`
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]FederationServer `json:"federation"`
}
// ExistsSettings checks if the settings file can by found at the given path.