Config dump

This commit is contained in:
Ben Sarmiento
2024-04-26 15:00:22 +02:00
parent 755b50c82f
commit 2dbabd3ead
4 changed files with 80 additions and 40 deletions

View File

@@ -4,7 +4,6 @@ type ConfigInterface interface {
GetConfig() ZurgConfig
GetVersion() string
GetToken() string
GetTokens() []string
GetNumOfWorkers() int
GetRefreshEverySecs() int
GetRepairEveryMins() int
@@ -35,9 +34,8 @@ type ConfigInterface interface {
}
type ZurgConfig struct {
Version string `yaml:"zurg" json:"-"`
Token string `yaml:"token" json:"-"`
Tokens []string `yaml:"tokens" json:"-"`
Version string `yaml:"zurg" json:"-"`
Token string `yaml:"token" json:"-"`
ApiTimeoutSecs int `yaml:"api_timeout_secs" json:"api_timeout_secs"`
CanRepair bool `yaml:"enable_repair" json:"enable_repair"`
@@ -74,10 +72,6 @@ func (z *ZurgConfig) GetToken() string {
return z.Token
}
func (z *ZurgConfig) GetTokens() []string {
return z.Tokens
}
func (z *ZurgConfig) GetHost() string {
if z.Host == "" {
return "[::]"