Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConfigFile ¶
func CreateConfigFile() string
func InitConfig ¶
func InitConfig(configPath string)
func ValidateConfig ¶
func ValidateConfig() error
Types ¶
type Authorization ¶
type Authorization struct {
APIToken string `mapstructure:"api_token"`
}
type Config ¶
type Config struct { IndexerKeys IndexerKeys `mapstructure:"indexer_keys"` Authorization Authorization `mapstructure:"authorization"` UserIDs UserIDs `mapstructure:"userid"` Ratio Ratio `mapstructure:"ratio"` SizeCheck SizeCheck `mapstructure:"sizecheck"` ParsedSizes ParsedSizeCheck Uploaders Uploaders `mapstructure:"uploaders"` RecordLabels RecordLabels `mapstructure:"record_labels"` Logs Logs `mapstructure:"logs"` }
type IndexerKeys ¶
type Logs ¶
type Logs struct { LogLevel string `mapstructure:"loglevel"` LogToFile bool `mapstructure:"logtofile"` LogFilePath string `mapstructure:"logfilepath"` MaxSize int `mapstructure:"maxsize"` // Max file size in MB MaxBackups int `mapstructure:"maxbackups"` // Max number of old log files to keep MaxAge int `mapstructure:"maxage"` // Max age in days to keep a log file Compress bool `mapstructure:"compress"` // Whether to compress old log files }
type ParsedSizeCheck ¶
type ParsedSizeCheck struct { MinSize bytesize.ByteSize MaxSize bytesize.ByteSize }
type RecordLabels ¶
type RecordLabels struct {
RecordLabels string `mapstructure:"record_labels"`
}
Click to show internal directories.
Click to hide internal directories.