backups

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 7 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 {
	Links   lowlevel.LinkList `json:"_links"`
	Actions lowlevel.LinkList `json:"_actions"`

	ID          string             `json:"id"`
	StartedAt   time.Time          `json:"startedAt"`
	CompletedAt time.Time          `json:"completedAt"`
	Status      string             `json:"status"`
	Keep        bool               `json:"keep"`
	Description string             `json:"description"`
	Software    spaces.SoftwareRef `json:"software"`
	Version     spaces.VersionRef  `json:"version"`

	Stage *StageRef `json:"stage"`
	Space *SpaceRef `json:"space"`
}

type BackupClient

type BackupClient interface {
	ListForSpace(spaceID string, opts *BackupListOptions) ([]Backup, error)
	ListForStage(spaceID, stage string, opts *BackupListOptions) ([]Backup, error)
	Get(backupID string) (*Backup, error)
	Create(spaceID string, stage string, keep bool, description string) (*Backup, error)
	Delete(backupID string) error
	Recover(backupID string, stage string, files RecoverySpec, databases RecoverySpec, metadata RecoverySpec) (*Recovery, error)
}

type BackupListOptions

type BackupListOptions struct {
	OnlyKeep bool
	Since    time.Time
}

type BackupRef

type BackupRef struct {
	ID   string `json:"id"`
	HREF string `json:"href"`
}

type Recovery

type Recovery struct {
	Links   lowlevel.LinkList `json:"_links"`
	Actions lowlevel.LinkList `json:"_actions"`

	ID          string      `json:"id"`
	StartedAt   time.Time   `json:"startedAt"`
	CompletedAt time.Time   `json:"completedAt"`
	Status      string      `json:"status"`
	Files       interface{} `json:"files"`
	Databases   interface{} `json:"databases"`
	Metadata    interface{} `json:"metadata"`

	Backup *BackupRef `json:"backup,omitempty"`
	Stage  string     `json:"stage,omitempty"`
}

type RecoveryClient

type RecoveryClient interface {
	ListForSpace(spaceID string) ([]Recovery, error)
	ListForBackupID(backupID string) ([]Recovery, error)
	ListForBackup(backup *Backup) ([]Recovery, error)
}

type RecoverySpec

type RecoverySpec struct {
	Type  RecoverySpecType
	Items []string
}

type RecoverySpecType

type RecoverySpecType int
const (
	RecoverAll RecoverySpecType = iota
	RecoverNone
	RecoverSpecific
)

type SpaceRef

type SpaceRef struct {
	ID   string `json:"id"`
	HREF string `json:"href"`
}

type StageRef

type StageRef struct {
	Name string `json:"name"`
	HREF string `json:"href"`
}

Jump to

Keyboard shortcuts

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