Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogging ¶
ConfigureLogging will take the logging configuration and also adds a few default parameters
Types ¶
type AppConfig ¶
type AppConfig struct { Log LogConfig `mapstructure:"log"` Repositories []*Repository `mapstructure:"repositories" validate:"required,dive"` }
ResticControllerConfig the collection of all configs
func ReloadConfig ¶
ReloadConfig (re-)loads and validates the config from the config file
type ForgetPolicy ¶
type ForgetPolicy struct { KeepLast int `mapstructure:"keep_last"` KeepDaily int `mapstructure:"keep_daily"` KeepHourly int `mapstructure:"keep_hourly"` KeepWeekly int `mapstructure:"keep_weekly"` KeepMonthly int `mapstructure:"keep_monthly"` KeepYearly int `mapstructure:"keep_yearly"` KeepTags []string `mapstructure:"keep_tags"` KeepWithin string `mapstructure:"keep_within"` }
ForgetPolicy specifies to restic retention policy rules
type LogConfig ¶
type LogConfig struct {
Level string
}
LogConfig specifies all the parameters needed for logging
type Repository ¶
type Repository struct { Name string `mapstructure:"name" validate:"required"` URL string `mapstructure:"url" validate:"required"` Password string `mapstructure:"password" validate:"required_without=PasswordFile"` PasswordFile string `mapstructure:"password_file" validate:"required_without=Password"` EnvFromFile map[string]string `mapstructure:"env_from_file"` Env map[string]string `mapstructure:"env"` AutoInitialize bool `mapstructure:"auto_initialize"` Backup struct { Schedule string `mapstructure:"schedule" validate:"required"` RunOnStartup bool `mapstructure:"run_on_startup"` IncludeFiles []string `mapstructure:"include_files" validate:"required"` ExcludeFiles []string `mapstructure:"exclude_files" validate:"required"` } `mapstructure:"backup" validate:"required"` IntegrityCheck struct { Schedule string `mapstructure:"schedule" validate:"required"` RunOnStartup bool `mapstructure:"run_on_startup"` } `mapstructure:"integrity_check" validate:"required"` Retention struct { Schedule string `mapstructure:"schedule" validate:"required"` RunOnStartup bool `mapstructure:"run_on_startup"` Policy *ForgetPolicy `mapstructure:"policy" validate:"required"` } `mapstructure:"retention" validate:"required"` }
Repository contains the configuration for a restic repository
Click to show internal directories.
Click to hide internal directories.