Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DoesConfigFileExist bool // Models configs Models []ModelConfig // gobackup base dir GoBackupDir = getGoBackupDir() PidFilePath = filepath.Join(GoBackupDir, "gobackup.pid") LogFilePath = filepath.Join(GoBackupDir, "gobackup.log") Web WebConfig )
Functions ¶
Types ¶
type ModelConfig ¶
type ModelConfig struct { Name string Description string // WorkDir of the gobackup started WorkDir 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 DefaultStorage string Notifiers map[string]SubConfig Viper *viper.Viper }
ModelConfig for special case
func GetModelConfigByName ¶
func GetModelConfigByName(name string) *ModelConfig
GetModelConfigByName get model config by name, nil if not found
func (*ModelConfig) GetDatabaseByName ¶
func (model *ModelConfig) GetDatabaseByName(name string) *SubConfig
GetDatabaseByName get database config by name, nil if not found
type ScheduleConfig ¶
type ScheduleConfig struct { Enabled bool `json:"enabled,omitempty"` // Cron expression Cron string `json:"cron,omitempty"` Every string `json:"every,omitempty"` At string `json:"at,omitempty"` }
func (ScheduleConfig) String ¶
func (sc ScheduleConfig) String() string
Click to show internal directories.
Click to hide internal directories.