status

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandStatus

type CommandStatus struct {
	Success bool      `json:"success"`
	Time    time.Time `json:"time"`
	Error   string    `json:"error"`
}

CommandStatus is the last command status

type Profile

type Profile struct {
	Backup    *CommandStatus `json:"backup,omitempty"`
	Retention *CommandStatus `json:"retention,omitempty"`
	Check     *CommandStatus `json:"check,omitempty"`
}

Profile status

func (*Profile) BackupError

func (p *Profile) BackupError(err error) *Profile

BackupError sets the error of the last backup

func (*Profile) BackupSuccess

func (p *Profile) BackupSuccess() *Profile

BackupSuccess indicates the last backup was successful

func (*Profile) CheckError

func (p *Profile) CheckError(err error) *Profile

CheckError sets the error of the last check

func (*Profile) CheckSuccess

func (p *Profile) CheckSuccess() *Profile

CheckSuccess indicates the last check was successful

func (*Profile) RetentionError

func (p *Profile) RetentionError(err error) *Profile

RetentionError sets the error of the last retention

func (*Profile) RetentionSuccess

func (p *Profile) RetentionSuccess() *Profile

RetentionSuccess indicates the last retention was successful

type Status

type Status struct {
	Profiles map[string]*Profile `json:"profiles"`
	// contains filtered or unexported fields
}

Status of last schedule profile

func NewStatus

func NewStatus(fileName string) *Status

NewStatus returns a new blank status

func (*Status) Load

func (s *Status) Load() *Status

Load existing status; does not complain if the file does not exists, or is not readable

func (*Status) Profile

func (s *Status) Profile(name string) *Profile

Profile gets the profile from its name (it creates a blank new one if not exists)

func (*Status) Save

func (s *Status) Save() error

Save current status to the file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL