Add tokens in config

This commit is contained in:
Ben Sarmiento
2024-02-18 23:28:25 +01:00
parent c7356a5b8d
commit 4215b390e0

View File

@@ -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 {