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)
}
func NewBackupClient ¶
func NewBackupClient(c *lowlevel.SpacesLowlevelClient, l *log.Logger) BackupClient
type BackupListOptions ¶
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)
}
func NewRecoveryClient ¶
func NewRecoveryClient(c *lowlevel.SpacesLowlevelClient, l *log.Logger) RecoveryClient
type RecoverySpec ¶
type RecoverySpec struct {
Type RecoverySpecType
Items []string
}
type RecoverySpecType ¶
type RecoverySpecType int
const ( RecoverAll RecoverySpecType = iota RecoverNone RecoverSpecific )
Click to show internal directories.
Click to hide internal directories.