types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	Id      string    `json:"backup-id"`
	Type    string    `json:"type"`
	Created time.Time `json:"created"`
	Volumes []Volume  `json:"volumes"`
}

type ContainerTemplate

type ContainerTemplate struct {
	Image   string            `yaml:"image"`
	Cmd     []string          `yaml:"cmd"`
	Env     []string          `yaml:"env"`
	Volumes []string          `yaml:"volumes"`
	Labels  map[string]string `yaml:"labels"`
}

type ContainerTemplates added in v0.0.16

type ContainerTemplates struct {
	Local   LocalContainerTemplates
	Offsite *OffsiteContainerTemplates
}

type CreateBackupRequest

type CreateBackupRequest struct {
	DryRun               bool                  `json:"dry-run"`
	Args                 TaskArgs              `json:"args"`
	NotificationSettings *NotificationSettings `json:"notification-settings"`
}

func DefaultCreateBackupRequest

func DefaultCreateBackupRequest() *CreateBackupRequest

type DaemonInput added in v0.0.14

type DaemonInput struct {
	BackupDir               string   `json:"backup-dir"`
	DockerHosts             []string `json:"docker-hosts"`
	LocalContainersConfig   string   `json:"local-containers-config"`
	OffsiteContainersConfig string   `json:"offsite-containers-config"`

	UnixSocket string `json:"unix-socket"`
	TcpAddr    string `json:"tcp-addr"`
	TcpApi     bool   `json:"tcp-api"`
	UI         bool   `json:"ui-enabled"`
	Metrics    bool   `json:"metrics-enabled"`
}

func DefaultDaemonInput added in v0.0.14

func DefaultDaemonInput() DaemonInput

type DeleteBackupRequest

type DeleteBackupRequest struct {
	Args TaskArgs `json:"args"`
}

func DefaultDeleteBackupRequest

func DefaultDeleteBackupRequest() *DeleteBackupRequest

type Filters

type Filters struct {
	StopModes      []string `json:"stop-modes"`
	IncludeNames   []string `json:"include-names"`
	IncludeVolumes []string `json:"include-volumes"`
	ExcludeNames   []string `json:"exclude-names"`
	ExcludeVolumes []string `json:"exclude-volumes"`
}

type LocalContainerTemplates

type LocalContainerTemplates struct {
	Backup  ContainerTemplate `yaml:"backup"`
	Restore ContainerTemplate `yaml:"restore"`
	FileExt string            `yaml:"file-ext"`
}

type NotificationSettings

type NotificationSettings struct {
	NotificationUrls    []string `json:"notification-urls"`
	NotifyJobStarted    bool     `json:"notify-job-started"`
	NotifyJobCompleted  bool     `json:"notify-job-completed"`
	NotifyJobError      bool     `json:"notify-job-error"`
	NotifyTaskStarted   bool     `json:"notify-task-started"`
	NotifyTaskCompleted bool     `json:"notify-task-completed"`
	NotifyTaskError     bool     `json:"notify-task-error"`
}

func DefaultNotificationSettings

func DefaultNotificationSettings() *NotificationSettings

type OffsiteContainerTemplates

type OffsiteContainerTemplates struct {
	OffsitePush ContainerTemplate `yaml:"offsite-push"`
	OffsitePull ContainerTemplate `yaml:"offsite-pull"`
}

type RestoreBackupRequest

type RestoreBackupRequest struct {
	DryRun               bool                  `json:"dry-run"`
	Args                 TaskArgs              `json:"args"`
	NotificationSettings *NotificationSettings `json:"notification-settings"`
}

func DefaultRestoreBackupRequest

func DefaultRestoreBackupRequest() *RestoreBackupRequest

type RotateBackupsRequest added in v0.0.9

type RotateBackupsRequest struct {
	Destroy      bool   `json:"destroy"`
	PoliciesPath string `json:"policies-path"`
}

type TaskArgs

type TaskArgs struct {
	BackupId    string  `json:"backup-id"`
	LabelPrefix string  `json:"label-prefix"`
	Filters     Filters `json:"filters"`
}

func DefaultTaskArgs

func DefaultTaskArgs(stopModes *keys.Key) TaskArgs

type Volume

type Volume struct {
	Name    string    `json:"name"`
	Ext     string    `json:"ext"`
	Mount   string    `json:"mount"`
	Created time.Time `json:"created"`
	Size    int64     `json:"size(kb)"`
	Error   string    `json:"error"`
}

Jump to

Keyboard shortcuts

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