45 lines
1011 B
Go
45 lines
1011 B
Go
package config
|
|
|
|
type ZurgConfig struct {
|
|
Version string `yaml:"zurg"`
|
|
Token string `yaml:"token"`
|
|
Port string `yaml:"port"`
|
|
NumOfWorkers int `yaml:"concurrent_workers"`
|
|
RefreshEverySeconds int `yaml:"check_for_changes_every_secs"`
|
|
CacheTimeHours int `yaml:"info_cache_time_hours"`
|
|
CanRepair bool `yaml:"enable_repair"`
|
|
OnLibraryUpdate string `yaml:"on_library_update"`
|
|
}
|
|
|
|
func (z *ZurgConfig) GetVersion() string {
|
|
return "v1"
|
|
}
|
|
|
|
func (z *ZurgConfig) GetToken() string {
|
|
return z.Token
|
|
}
|
|
|
|
func (z *ZurgConfig) GetPort() string {
|
|
return z.Port
|
|
}
|
|
|
|
func (z *ZurgConfig) GetNumOfWorkers() int {
|
|
return z.NumOfWorkers
|
|
}
|
|
|
|
func (z *ZurgConfig) GetRefreshEverySeconds() int {
|
|
return z.RefreshEverySeconds
|
|
}
|
|
|
|
func (z *ZurgConfig) GetCacheTimeHours() int {
|
|
return z.CacheTimeHours
|
|
}
|
|
|
|
func (z *ZurgConfig) EnableRepair() bool {
|
|
return z.CanRepair
|
|
}
|
|
|
|
func (z *ZurgConfig) GetOnLibraryUpdate() string {
|
|
return z.OnLibraryUpdate
|
|
}
|