backuper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2014 License: MIT Imports: 1 Imported by: 6

Documentation

Index

Constants

View Source
const (
	BackupErrorCrytical = "alert"
	BackupErrorCleanup  = "warning"
	BackupErrorTask     = "warning"
	BackupErrorTaskAll  = "alert"
	BackupErrorNo       = "success"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	StartNow    bool         `json:"start_now"`
	Destination Destination  `json:"destination"`
	TmpDir      string       `json:"tmp_dir"`
	Tasks       []TaskConfig `json:"tasks"`
	Period      Period       `json:"period"`
}

type BackupResult

type BackupResult struct {
	Prepare   PathResult   `json:"prepare"`
	Lock      PathResult   `json:"lock"`
	Backup    []PathResult `json:"backup"`
	Encrypt   PathResult   `json:"encrypt"`
	Upload    PathResult   `json:"upload"`
	Unlock    PathResult   `json:"unlock"`
	Cleanup   PathResult   `json:"cleanup"`
	BeginTime time.Time    `json:"begin_time"`
	EndTime   time.Time    `json:"end_time"`
	Size      int64        `json:"size"`
	Status    string       `json:"status"`
}

type ClientConfig

type ClientConfig struct {
	Token string
}

type Destination

type Destination struct {
	Type   string            `json:"type"`
	Params map[string]string `json:"params"`
}

type PathResult

type PathResult struct {
	Err       *string   `json:"error"`
	Path      string    `json:"path"`
	Output    *string   `json:"output"`
	BeginTime time.Time `json:"begin_time"`
	EndTime   time.Time `json:"end_time"`
}

func NewPathResult

func NewPathResult(err error, path, output string, begin, end time.Time) PathResult

type Period

type Period struct {
	Type       string   `json:"type"`
	Time       string   `json:"time"`
	DaysOfWeek []string `json:"days_of_week"`
}

type TaskConfig

type TaskConfig struct {
	Type        string            `json:"type"`
	Name        string            `json:"name"`
	Compression string            `json:"compression"`
	Params      map[string]string `json:"params"`
}

Jump to

Keyboard shortcuts

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