Versions in this module Expand all Collapse all v0 v0.5.0 Feb 21, 2022 Changes in this version + func BasicAuth(h http.Handler, myUser, myPass string) http.Handler + func BoolToString(b bool) string + func ConfigMapToJson(configMap map[string]string) (string, error) + func ConvertEpoch(epoch string) string + func ConvertEpochToTime(epoch string) time.Time + func CreateDir(path string, mode os.FileMode) error + func DirectoryList(path string) ([]string, error) + func DirectoryTreeList(dir string) ([]string, error) + func EncodeConfig(config Config) (*bytes.Buffer, error) + func EncodePluginConfig(configMap map[string]string) (*bytes.Buffer, error) + func ExistsBackupRetention(policy string, retentions []BackupRetention) bool + func ExistsInArray(array []string, str string) bool + func ExistsPath(path string) bool + func FileList(path string) ([]string, error) + func GetArchiveRetention(policy string, retentions []ArchiveRetention) int + func GetBackupDirFromConfig(config Config) string + func GetBackupDirFromMap(configMap map[string]string) string + func GetBackupName(name, policy, workflowId, timestamp string) string + func GetBackupPathFromConfig(config Config) string + func GetBackupPathFromMap(configMap map[string]string) string + func GetBackupRetention(policy string, retentions []BackupRetention) int + func GetCronScheduleId(w http.ResponseWriter, r *http.Request) (cron.EntryID, error) + func GetLoggerInstance() *log.Logger + func GetPluginConfig(w http.ResponseWriter, r *http.Request) (map[string]string, error) + func GetPluginPath(pluginName, pluginType string) string + func GetRestoreSnapshot(config Config, snapshots []string) (string, error) + func GetRestoreSrcPath(config Config) (string, error) + func GetRestoreSrcPathFromMap(configMap map[string]string) (string, error) + func GetTimestamp() int64 + func GetWorkflowId() int + func Int32ToString(i int32) string + func Int64ToString(i int64) string + func IntInSlice(i int, list []int) bool + func IntToString(i int) string + func IsDirectory(path string) (bool, error) + func JoinArray(array, combinedArray []string) []string + func LogApi(inner http.Handler, name string) http.Handler + func LogCmdMessage(l *log.Logger, message string) + func LogCommentMessage(l *log.Logger, message string) + func LogDebugMessage(l *log.Logger, message string) + func LogErrorMessage(l *log.Logger, message string) + func LogInfoMessage(l *log.Logger, message string) + func LogMessageToConsole(l *log.Logger, message Message) + func LogResult(l *log.Logger, result Result) + func LogResults(l *log.Logger, result []Result) + func LogWarnMessage(l *log.Logger, message string) + func PluginList(path, configName string) ([]string, error) + func ReadConfigToMap(filePath string) (map[string]string, error) + func ReadGob(filePath string, object interface{}) error + func RecursiveDirDelete(dir string) error + func SerializeBackup(resultsDir string, backup *Backup) + func SerializeWorkflow(resultsDir string, workflow *Workflow) + func SerializeWorkflowStepResults(resultsDir string, stepId int, results Result) + func SetStepComplete(workflow *Workflow, step Step) + func SetStepError(workflow *Workflow, step Step) + func SetWorkflowStatusEnd(workflow *Workflow) + func SetWorkflowStatusError(workflow *Workflow) + func SetWorkflowStatusStart(workflow *Workflow) + func SetWorkflowStep(workflow *Workflow, step Step) + func StringToInt(s string) int + func StringToInt64(s string) int64 + func WriteConfig(filePath string, config Config) error + func WriteGob(filePath string, object interface{}) error + func WritePluginConfig(filePath string, configMap map[string]string) error + type AppPlugin interface + Discover func(Config) DiscoverResult + Info func() Plugin + PostRestore func(Config) Result + PreRestore func(Config) Result + Quiesce func(Config) Result + SetEnv func(Config) Result + Unquiesce func(Config) Result + func GetAppInterface(path string) (AppPlugin, error) + type Archive struct + Epoch int + Name string + Policy string + Timestamp string + WorkflowId string + func GetArchivesByPolicy(policy string, archives []Archive) []Archive + type ArchivePlugin interface + Archive func(Config) Result + ArchiveDelete func(Config) Result + ArchiveList func(Config) Archives + Info func() Plugin + SetEnv func(Config) Result + func GetArchiveInterface(path string) (ArchivePlugin, error) + type ArchiveRetention struct + Policy string + RetentionNumber int + type Archives struct + Archives []Archive + Result Result + type Backup struct + Contents []Content + Epoch int + Name string + Policy string + Timestamp string + WorkflowId string + func GetBackup(w http.ResponseWriter, r *http.Request) (Backup, error) + func GetBackupsByPolicy(policy string, backups []Backup) []Backup + type BackupByWorkflow struct + Backup Backup + Result Result + type BackupRetention struct + Policy string + RetentionNumber int + type Backups struct + Backups []Backup + Result Result + type ByEpochArchive []Archive + func (a ByEpochArchive) Len() int + func (a ByEpochArchive) Less(i, j int) bool + func (a ByEpochArchive) Swap(i, j int) + type ByEpochBackup []Backup + func (a ByEpochBackup) Len() int + func (a ByEpochBackup) Less(i, j int) bool + func (a ByEpochBackup) Swap(i, j int) + type Capability struct + Name string + type Config struct + AccessWithinCluster string + AppPlugin string + AppPluginParameters map[string]string + AppQuiesceCmd string + AppUnquiesceCmd string + ArchiveCreateCmd string + ArchiveDeleteCmd string + ArchivePlugin string + ArchivePluginParameters map[string]string + ArchiveRetentions []ArchiveRetention + AutoDiscovery bool + Backup Backup + BackupCreateCmd string + BackupDeleteCmd string + BackupRetentions []BackupRetention + ConfigName string + ContainerPlatform string + JobRetention int + OperatorControlled bool + PostAppQuiesceCmd string + PostAppRestoreCmd string + PostAppUnquiesceCmd string + PreAppQuiesceCmd string + PreAppRestoreCmd string + PreAppUnquiesceCmd string + ProfileName string + RestoreCmd string + SelectedArchiveRetention int + SelectedBackupPolicy string + SelectedBackupRetention int + SelectedWorkflowId int + SendTrapErrorCmd string + SendTrapSuccessCmd string + StoragePlugin string + StoragePluginParameters map[string]string + WorkflowId string + WorkflowTimestamp int64 + WorkflowType string + func GetConfig(w http.ResponseWriter, r *http.Request) (Config, error) + func GetConsolidatedConfig(configDir, profileName, configName, policyName string) (Config, error) + func ReadConfig(filePath string) (Config, error) + func SetAppPluginParameters(appConfigPath string, config Config) (Config, error) + func SetArchivePluginParameters(archiveConfigPath string, config Config) (Config, error) + func SetStoragePluginParameters(storageConfigPath string, config Config) (Config, error) + type ConfigMapResult struct + ConfigMap map[string]string + Result Result + type ConfigResult struct + Config Config + Result Result + type Content struct + Data string + Metadata string + Size string + Source string + StorageClass string + Type string + VolumeSnapshotClass string + type CronSchedule struct + Value string + func GetCronSchedule(w http.ResponseWriter, r *http.Request) (CronSchedule, error) + type Discover struct + DataFilePaths []string + Instance string + LogFilePaths []string + type DiscoverResult struct + DiscoverList []Discover + Result Result + type Job struct + Id int + Policy string + Status string + Timestamp string + Type string + func ListJobs(jobsDir string) ([]Job, error) + type JobSchedule struct + BackupPolicy string + ConfigName string + CronId cron.EntryID + CronSchedule string + ProfileName string + type JobScheduleResult struct + JobSchedule JobSchedule + Result Result + type JobSchedulesResult struct + JobSchedules []JobSchedule + Result Result + type Jobs struct + Jobs []Job + Result Result + type Message struct + Level string + Message string + Timestamp int64 + func PrependMessage(message Message, messages []Message) []Message + func PrependMessages(prependedMessages, postpendedMessages []Message) []Message + func SetMessage(level string, msg string) Message + func SetMessages(inputMessages []string) []Message + type Plugin struct + Capabilities []Capability + Description string + Name string + Type string + Version string + type PluginConfigMap struct + Key1 string + Key2 string + type PluginInfoResult struct + Plugin Plugin + Result Result + type Result struct + Backup Backup + Code int + Data []string + Messages []Message + func DeleteJobs(baseDir, profileName, configName string, jobRetention int) Result + func ExecuteCommand(args ...string) (result Result) + func ExecutePlugin(config Config, pluginType string, args ...string) (result Result) + func SetResult(code int, messages []Message) Result + func SetResultMessage(code int, level, msg string) Result + type ResultSimple struct + Code int + Data []string + Messages []string + func ExecutePluginSimple(config Config, pluginType string, args ...string) (result ResultSimple) + func SetResultSimple(code int, messages []string) ResultSimple + type Status struct + Msg string + Version string + type Step struct + Id int + Label string + Status string + func CreateCommentStep(workflow *Workflow) Step + func CreateStep(workflow *Workflow) Step + func GetWorkflowSteps(w http.ResponseWriter, r *http.Request) []Step + type StoragePlugin interface + Backup func(Config) Result + BackupDelete func(Config) Result + BackupDeleteWorkflow func(Config) Result + BackupList func(Config) Backups + Info func() Plugin + Mount func(Config) Result + Restore func(Config) Result + SetEnv func(Config) Result + Unmount func(Config) Result + func GetStorageInterface(path string) (StoragePlugin, error) + type Workflow struct + Id int + LastMessage string + Policy string + Status string + Steps []Step + Timestamp string + Type string + type WorkflowResult struct + Id int + Result Result + type WorkflowStatusResult struct + Result Result + Workflow Workflow