Documentation
¶
Index ¶
- 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 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 GetBackupDirFromConfig(config Config) string
- func GetBackupDirFromMap(configMap map[string]string) string
- func GetBackupName(name, policy, workflowId 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 string) string
- func GetRestoreSrcPath(config Config) (string, error)
- func GetRestoreSrcPathFromMap(configMap map[string]string) (string, error)
- func GetTimestamp() int64
- func GetWorkflowId() int
- func Int64ToString(i int64) string
- func IntInSlice(i int, list []int) bool
- func IntToString(i int) string
- 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 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
- type Archive
- type ArchivePlugin
- type Archives
- type Backup
- type BackupRetention
- type Backups
- type ByEpoch
- type Capability
- type Config
- type ConfigMapResult
- type ConfigResult
- type CronSchedule
- type Discover
- type DiscoverResult
- type Job
- type JobSchedule
- type JobScheduleResult
- type Jobs
- type Message
- type Plugin
- type PluginConfigMap
- type PluginInfoResult
- type Result
- 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
- type Status
- type Step
- type StoragePlugin
- type Workflow
- type WorkflowResult
- type WorkflowStatusResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToString ¶
func ConvertEpoch ¶
func ConvertEpochToTime ¶
func DirectoryList ¶
func EncodePluginConfig ¶
func ExistsBackupRetention ¶
func ExistsBackupRetention(policy string, retentions []BackupRetention) bool
func ExistsInArray ¶
func ExistsPath ¶
func GetBackupDirFromConfig ¶
func GetBackupDirFromMap ¶
func GetBackupName ¶
func GetBackupPathFromConfig ¶
func GetBackupPathFromMap ¶
func GetBackupRetention ¶
func GetBackupRetention(policy string, retentions []BackupRetention) int
func GetCronScheduleId ¶
func GetLoggerInstance ¶
func GetPluginConfig ¶
func GetPluginPath ¶
func GetRestoreSrcPath ¶
func GetTimestamp ¶
func GetTimestamp() int64
func GetWorkflowId ¶
func GetWorkflowId() int
func Int64ToString ¶
func IntInSlice ¶
func IntToString ¶
func LogCmdMessage ¶
func LogCommentMessage ¶
func LogDebugMessage ¶
func LogErrorMessage ¶
func LogInfoMessage ¶
func LogMessageToConsole ¶
func LogResults ¶
func LogWarnMessage ¶
func PluginList ¶
func RecursiveDirDelete ¶
func SerializeWorkflow ¶
func SetStepComplete ¶
func SetStepError ¶
func SetWorkflowStatusEnd ¶
func SetWorkflowStatusEnd(workflow *Workflow)
func SetWorkflowStatusError ¶
func SetWorkflowStatusError(workflow *Workflow)
func SetWorkflowStatusStart ¶
func SetWorkflowStatusStart(workflow *Workflow)
func SetWorkflowStep ¶
func StringToInt ¶
func StringToInt64 ¶
func WriteConfig ¶
Types ¶
type AppPlugin ¶
type AppPlugin interface {
SetEnv(Config) Result
Quiesce(Config) Result
Unquiesce(Config) Result
PreRestore(Config) Result
PostRestore(Config) Result
Discover(Config) DiscoverResult
Info() Plugin
}
func GetAppInterface ¶
type ArchivePlugin ¶
type ArchivePlugin interface {
SetEnv(Config) Result
Archive(Config) Result
ArchiveDelete(Config) Result
ArchiveList(Config) []Archive
Info() Plugin
}
func GetArchiveInterface ¶
func GetArchiveInterface(path string) (ArchivePlugin, error)
type Backup ¶
type Backup struct {
Name string `json:"name,omitempty"`
Timestamp string `json:"timestamp,omitempty"`
Epoch int `json:"epoch,omitempty"`
Policy string `json:"policy,omitempty"`
WorkflowId string `json:"workflowId,omitempty"`
}
func GetBackupsByPolicy ¶
type BackupRetention ¶
type Capability ¶
type Capability struct {
Name string `json:"name"`
}
type Config ¶
type Config struct {
ProfileName string `json:"profileName,omitempty"`
ConfigName string `json:"configName,omitempty"`
WorkflowId string `json:"workflowId,omitempty"`
AppPlugin string `json:"appPlugin"`
StoragePlugin string `json:"storagePlugin"`
ArchivePlugin string `json:"archivePlugin"`
AutoDiscovery bool `json:"autoDiscovery"`
JobRetention int `json:"jobRetention"`
BackupRetentions []BackupRetention `json:"backupRetentions"`
SelectedBackupPolicy string `json:"backupPolicy,omitmepty"`
SelectedBackupRetention int `json:"backupRetention,omitmepty"`
SelectedWorkflowId int `json:"selectedWorkflowId,omitmepty"`
PreAppQuiesceCmd string `json:"preAppQuiesceCmd,omitempty"`
AppQuiesceCmd string `json:"appQuiesceCmd,omitempty"`
PostAppQuiesceCmd string `json:"postAppQuiesceCmd,omitempty"`
BackupCreateCmd string `json:"backupCreateCmd,omitempty"`
BackupDeleteCmd string `json:"backupDeleteCmd,omitempty"`
ArchiveCreateCmd string `json:"archiveCreateCmd,omitempty"`
ArchiveDeleteCmd string `json:"archiveDeleteCmd,omitempty"`
PreAppUnquiesceCmd string `json:"preAppUnquiesceCmd,omitempty"`
AppUnquiesceCmd string `json:"appUnquiesceCmd,omitempty"`
PostAppUnquiesceCmd string `json:"postAppUnquiesceCmd,omitempty"`
PreAppRestoreCmd string `json:"preAppRestoreCmd,omitempty"`
RestoreCmd string `json:"restoreCmd,omitempty"`
PostAppRestoreCmd string `json:"postAppRestoreCmd,omitempty"`
SendTrapErrorCmd string `json:"sendTrapErrorCmd,omitempty"`
SendTrapSuccessCmd string `json:"sendTrapSuccessCmd,omitempty"`
AppPluginParameters map[string]string `json:"appPluginParameters,omitempty"`
StoragePluginParameters map[string]string `json:"storagePluginParameters,omitempty"`
}
func ReadConfig ¶
func SetAppPluginParameters ¶
type ConfigMapResult ¶
type ConfigResult ¶
type CronSchedule ¶
type CronSchedule struct {
Value string `json:"value,omitempty"`
}
func GetCronSchedule ¶
func GetCronSchedule(w http.ResponseWriter, r *http.Request) (CronSchedule, error)
type DiscoverResult ¶
type Job ¶
type JobSchedule ¶
type JobScheduleResult ¶
type JobScheduleResult struct {
JobSchedules []JobSchedule `json:"jobSchedules,omitempty"`
Result Result `json:"result,omitempty"`
}
type Message ¶
type Message struct {
Timestamp int64 `json:"time,omitempty"`
Level string `json:"level,omitempty"`
Message string `json:"message,omitempty"`
}
func PrependMessage ¶
func PrependMessages ¶
func SetMessage ¶
func SetMessages ¶
type Plugin ¶
type Plugin struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
Type string `json:"type,omitempty"`
Capabilities []Capability `json:"capabilities"`
}
type PluginConfigMap ¶
type PluginInfoResult ¶
type Result ¶
type Result struct {
Code int `json:"code,omitempty"`
Messages []Message `json:"messages,omitempty"`
Data []string `json:"data,omitempty"`
}
func DeleteJobs ¶
func ExecuteCommand ¶
func ExecutePlugin ¶
func SetResultMessage ¶
type ResultSimple ¶
type ResultSimple struct {
Code int `json:"code,omitempty"`
Messages []string `json:"messages,omitempty"`
Data []string `json:"data,omitempty"`
}
func ExecutePluginSimple ¶
func ExecutePluginSimple(config Config, pluginType string, args ...string) (result ResultSimple)
func SetResultSimple ¶
func SetResultSimple(code int, messages []string) ResultSimple
type Step ¶
type Step struct {
Id int `json:"id"`
Status string `json:"status"`
Label string `json:"label,omitempty"`
}
func CreateCommentStep ¶
func CreateStep ¶
func GetWorkflowSteps ¶
func GetWorkflowSteps(w http.ResponseWriter, r *http.Request) []Step
type StoragePlugin ¶
type StoragePlugin interface {
SetEnv(Config) Result
Backup(Config) Result
Restore(Config) Result
BackupDelete(Config) Result
BackupList(Config) Backups
Info() Plugin
}
func GetStorageInterface ¶
func GetStorageInterface(path string) (StoragePlugin, error)
type WorkflowResult ¶
type WorkflowStatusResult ¶
Click to show internal directories.
Click to hide internal directories.