Add tokens in config
This commit is contained in:
@@ -4,6 +4,7 @@ type ConfigInterface interface {
|
|||||||
GetConfig() ZurgConfig
|
GetConfig() ZurgConfig
|
||||||
GetVersion() string
|
GetVersion() string
|
||||||
GetToken() string
|
GetToken() string
|
||||||
|
GetTokens() []string
|
||||||
GetNumOfWorkers() int
|
GetNumOfWorkers() int
|
||||||
GetRefreshEverySecs() int
|
GetRefreshEverySecs() int
|
||||||
GetRepairEveryMins() int
|
GetRepairEveryMins() int
|
||||||
@@ -36,6 +37,7 @@ type ConfigInterface interface {
|
|||||||
type ZurgConfig struct {
|
type ZurgConfig struct {
|
||||||
Version string `yaml:"zurg" json:"-"`
|
Version string `yaml:"zurg" json:"-"`
|
||||||
Token string `yaml:"token" json:"-"`
|
Token string `yaml:"token" json:"-"`
|
||||||
|
Tokens []string `yaml:"tokens" json:"-"`
|
||||||
|
|
||||||
ApiTimeoutSecs int `yaml:"api_timeout_secs" json:"api_timeout_secs"`
|
ApiTimeoutSecs int `yaml:"api_timeout_secs" json:"api_timeout_secs"`
|
||||||
CanRepair bool `yaml:"enable_repair" json:"enable_repair"`
|
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"`
|
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
|
||||||
RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"`
|
RetriesUntilFailed int `yaml:"retries_until_failed" json:"retries_until_failed"`
|
||||||
ServeFromRclone bool `yaml:"serve_from_rclone" json:"serve_from_rclone"`
|
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"`
|
TorrentsCount int `yaml:"get_torrents_count" json:"get_torrents_count"`
|
||||||
|
Username string `yaml:"username" json:"username"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (z *ZurgConfig) GetConfig() ZurgConfig {
|
func (z *ZurgConfig) GetConfig() ZurgConfig {
|
||||||
|
|||||||
Reference in New Issue
Block a user