Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Exist Is config file exist Exist bool // Models configs Models []ModelConfig // gobackup base dir GoBackupDir string = getGoBackupDir() )
Functions ¶
Types ¶
type ModelConfig ¶
type ModelConfig struct { Name string TempPath string DumpPath string Schedule ScheduleConfig CompressWith SubConfig EncryptWith SubConfig Archive *viper.Viper Splitter *viper.Viper Databases map[string]SubConfig Storages map[string]SubConfig Notifiers map[string]SubConfig Viper *viper.Viper }
ModelConfig for special case
func GetModelConfigByName ¶
func GetModelConfigByName(name string) (model *ModelConfig)
GetModelConfigByName get model config by name
func (*ModelConfig) GetDatabaseByName ¶
func (model *ModelConfig) GetDatabaseByName(name string) (subConfig *SubConfig)
GetDatabaseByName get database config by name
type ScheduleConfig ¶
type ScheduleConfig struct { Enabled bool // Cron expression Cron string // Every Every string // At time At string }
func (ScheduleConfig) String ¶
func (sc ScheduleConfig) String() string
Click to show internal directories.
Click to hide internal directories.