From 4215b390e0b41d2bd5da804b6a8d3e5feedcf2e4 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sun, 18 Feb 2024 23:28:25 +0100 Subject: [PATCH] Add tokens in config --- internal/config/types.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/config/types.go b/internal/config/types.go index b693b71..58252d0 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -4,6 +4,7 @@ type ConfigInterface interface { GetConfig() ZurgConfig GetVersion() string GetToken() string + GetTokens() []string GetNumOfWorkers() int GetRefreshEverySecs() int GetRepairEveryMins() int @@ -34,8 +35,9 @@ type ConfigInterface interface { } type ZurgConfig struct { - Version string `yaml:"zurg" json:"-"` - Token string `yaml:"token" json:"-"` + Version string `yaml:"zurg" json:"-"` + Token string `yaml:"token" json:"-"` + Tokens []string `yaml:"tokens" json:"-"` ApiTimeoutSecs int `yaml:"api_timeout_secs" json:"api_timeout_secs"` CanRepair bool `yaml:"enable_repair" json:"enable_repair"` @@ -60,8 +62,8 @@ type ZurgConfig struct { RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"` RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"` ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"` - Username string `yaml:"username" json:"username"` TorrentsCount int `yaml:"get_torrents_count" json:"get_torrents_count"` + Username string `yaml:"username" json:"username"` } func (z *ZurgConfig) GetConfig() ZurgConfig {