Skip to content

Commit

Permalink
Formalize json tags
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDallas committed Jul 4, 2022
1 parent 2c05d85 commit 5c06dd4
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions internal/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,33 @@ const (
)

type ArrConfig struct {
Name string `yaml:"Name"`
URL string `yaml:"URL"`
APIKey string `yaml:"APIKey"`
Type ArrType `yaml:"Type"`
Name string `yaml:"Name" json:"Name"`
URL string `yaml:"URL" json:"URL"`
APIKey string `yaml:"APIKey" json:"APIKey"`
Type ArrType `yaml:"Type" json:"Type"`
}

type Config struct {
altConfigLocation string
appCallback AppCallback

PremiumizemeAPIKey string `yaml:"PremiumizemeAPIKey"`
//PremiumizemeAPIKey string with yaml and json tag
PremiumizemeAPIKey string `yaml:"PremiumizemeAPIKey" json:"PremiumizemeAPIKey"`

Arrs []ArrConfig `yaml:"Arrs"`
Arrs []ArrConfig `yaml:"Arrs" json:"Arrs"`

BlackholeDirectory string `yaml:"BlackholeDirectory"`
PollBlackholeDirectory bool `yaml:"PollBlackholeDirectory"`
PollBlackholeIntervalMinutes int `yaml:"PollBlackholeIntervalMinutes"`
BlackholeDirectory string `yaml:"BlackholeDirectory" json:"BlackholeDirectory"`
PollBlackholeDirectory bool `yaml:"PollBlackholeDirectory" json:"PollBlackholeDirectory"`
PollBlackholeIntervalMinutes int `yaml:"PollBlackholeIntervalMinutes" json:"PollBlackholeIntervalMinutes"`

DownloadsDirectory string `yaml:"DownloadsDirectory"`
DownloadsDirectory string `yaml:"DownloadsDirectory" json:"DownloadsDirectory"`

UnzipDirectory string `yaml:"UnzipDirectory"`
UnzipDirectory string `yaml:"UnzipDirectory" json:"UnzipDirectory"`

BindIP string `yaml:"bindIP"`
BindPort string `yaml:"bindPort"`
BindIP string `yaml:"bindIP" json:"BindIP"`
BindPort string `yaml:"bindPort" json:"BindPort"`

WebRoot string `yaml:"WebRoot"`
WebRoot string `yaml:"WebRoot" json:"WebRoot"`

SimultaneousDownloads int `yaml:"SimultaneousDownloads"`
SimultaneousDownloads int `yaml:"SimultaneousDownloads" json:"SimultaneousDownloads"`
}

0 comments on commit 5c06dd4

Please sign in to comment.