Documentation ¶
Index ¶
- type BackupStatus
- type CommandStatus
- type Profile
- func (p *Profile) BackupError(err error, summary monitor.Summary, stderr string) *Profile
- func (p *Profile) BackupSuccess(summary monitor.Summary, stderr string) *Profile
- func (p *Profile) CheckError(err error, summary monitor.Summary, stderr string) *Profile
- func (p *Profile) CheckSuccess(summary monitor.Summary, stderr string) *Profile
- func (p *Profile) RetentionError(err error, summary monitor.Summary, stderr string) *Profile
- func (p *Profile) RetentionSuccess(summary monitor.Summary, stderr string) *Profile
- type Progress
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupStatus ¶
type BackupStatus struct { CommandStatus FilesNew int `json:"files_new"` FilesChanged int `json:"files_changed"` FilesUnmodified int `json:"files_unmodified"` DirsNew int `json:"dirs_new"` DirsChanged int `json:"dirs_changed"` DirsUnmodified int `json:"dirs_unmodified"` FilesTotal int `json:"files_total"` BytesAdded uint64 `json:"bytes_added"` BytesTotal uint64 `json:"bytes_total"` }
BackupStatus contains the last backup status
type CommandStatus ¶
type CommandStatus struct { Success bool `json:"success"` Time time.Time `json:"time"` Error string `json:"error"` Stderr string `json:"stderr"` Duration int64 `json:"duration"` }
CommandStatus is the last command status
type Profile ¶
type Profile struct { Backup *BackupStatus `json:"backup,omitempty"` Retention *CommandStatus `json:"retention,omitempty"` Check *CommandStatus `json:"check,omitempty"` }
Profile status
func (*Profile) BackupError ¶
BackupError sets the error of the last backup
func (*Profile) BackupSuccess ¶
BackupSuccess indicates the last backup was successful
func (*Profile) CheckError ¶
CheckError sets the error of the last check
func (*Profile) CheckSuccess ¶
CheckSuccess indicates the last check was successful
func (*Profile) RetentionError ¶
RetentionError sets the error of the last retention
type Status ¶
type Status struct { Profiles map[string]*Profile `json:"profiles"` // contains filtered or unexported fields }
Status of last schedule profile
func (*Status) Load ¶
Load existing status; does not complain if the file does not exists, or is not readable
Click to show internal directories.
Click to hide internal directories.