backups

package
v0.5.20 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	CheckpointID string            `json:"checkpoint_id"`
	CreatedAt    string            `json:"created_at"`
	Description  string            `json:"description"`
	ExpiredAt    string            `json:"expired_at"`
	ExtendInfo   *BackupExtendInfo `json:"extend_info"`
	ID           string            `json:"id"`
	ImageType    string            `json:"image_type"`
	Name         string            `json:"name"`
	ParentID     string            `json:"parent_id"`
	ProjectID    string            `json:"project_id"`
	ProtectedAt  string            `json:"protected_at"`
	ResourceAZ   string            `json:"resource_az"`
	ResourceID   string            `json:"resource_id"`
	ResourceName string            `json:"resource_name"`
	ResourceSize int               `json:"resource_size"`
	ResourceType string            `json:"resource_type"`
	Status       string            `json:"status"`
	UpdatedAt    string            `json:"updated_at"`
	VaultId      string            `json:"vault_id"`
	ProviderID   string            `json:"provider_id"`
	Children     []BackupResp      `json:"children"`
}

func ExtractBackups

func ExtractBackups(r pagination.Page) ([]Backup, error)

func FilterBackups

func FilterBackups(backups []Backup, opts ListOpts) ([]Backup, error)

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Backup, error)

type BackupExtendInfo

type BackupExtendInfo struct {
	AutoTrigger          bool        `json:"auto_trigger"`
	Bootable             bool        `json:"bootable"`
	Incremental          bool        `json:"incremental"`
	SnapshotID           string      `json:"snapshot_id"`
	SupportLld           bool        `json:"support_lld"`
	SupportedRestoreMode string      `json:"supported_restore_mode"`
	OsImagesData         []ImageData `json:"os_images_data"`
	ContainSystemDisk    bool        `json:"contain_system_disk"`
	Encrypted            bool        `json:"encrypted"`
	SystemDisk           bool        `json:"system_disk"`
}

type BackupPage

type BackupPage struct {
	pagination.LinkedPageBase
}

func (BackupPage) IsEmpty

func (r BackupPage) IsEmpty() (bool, error)

func (BackupPage) NextPageURL

func (r BackupPage) NextPageURL() (string, error)

type BackupResp

type BackupResp struct {
	CheckpointID string            `json:"checkpoint_id"`
	CreatedAt    string            `json:"created_at"`
	Description  string            `json:"description"`
	ExpiredAt    string            `json:"expired_at"`
	ExtendInfo   *BackupExtendInfo `json:"extend_info"`
	ID           string            `json:"id"`
	ImageType    string            `json:"image_type"`
	Name         string            `json:"name"`
	ParentID     string            `json:"parent_id"`
	ProjectID    string            `json:"project_id"`
	ProtectedAt  string            `json:"protected_at"`
	ResourceAZ   string            `json:"resource_az"`
	ResourceID   string            `json:"resource_id"`
	ResourceName string            `json:"resource_name"`
	ResourceSize int               `json:"resource_size"`
	ResourceType string            `json:"resource_type"`
	Status       string            `json:"status"`
	UpdatedAt    string            `json:"updated_at"`
	VaultID      string            `json:"vault_id"`
	ProviderID   string            `json:"provider_id"`
}

type BackupRestoreServer

type BackupRestoreServer struct {
	BackupID string `json:"backup_id"`
	VolumeID string `json:"volume_id"`
}

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)

type GetResult

type GetResult struct {
	golangsdk.Result
}

func Get

func Get(client *golangsdk.ServiceClient, id string) (r GetResult)

func (GetResult) Extract

func (r GetResult) Extract() (*Backup, error)

type ImageData

type ImageData struct {
	ImageID string `json:"image_id"`
}

type ListOpts

type ListOpts struct {
	ID           string
	CheckpointID string `q:"checkpoint_id"`
	ImageType    string `q:"image_type"`
	Limit        string `q:"limit"`
	Marker       string `q:"marker"`
	Name         string `q:"name"`
	Offset       string `q:"offset"`
	ParentID     string `q:"parent_id"`
	ResourceAZ   string `q:"resource_az"`
	ResourceID   string `q:"resource_id"`
	ResourceName string `q:"resource_name"`
	ResourceType string `q:"resource_type"`
	Sort         string `q:"sort"`
	Status       string `q:"status"`
	VaultID      string `q:"vault_id"`
}

ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the flavor attributes you want to see returned.

func (ListOpts) ToBackupListQuery

func (opts ListOpts) ToBackupListQuery() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToBackupListQuery() (string, error)
}

type RestoreBackupOpts

type RestoreBackupOpts struct {
	Restore RestoreBackupStruct `json:"restore"`
}

func (RestoreBackupOpts) ToRestoreBackup

func (opts RestoreBackupOpts) ToRestoreBackup() (map[string]interface{}, error)

type RestoreBackupResult

type RestoreBackupResult struct {
	golangsdk.ErrResult
}

func RestoreBackup

func RestoreBackup(client *golangsdk.ServiceClient, backupID string, opts RestoreResourcesOptsBuilder) (r RestoreBackupResult)

type RestoreBackupStruct

type RestoreBackupStruct struct {
	Mappings []BackupRestoreServer `json:"mappings,omitempty"`
	PowerOn  bool                  `json:"power_on,omitempty"`
	ServerID string                `json:"server_id,omitempty"`
	VolumeID string                `json:"volume_id,omitempty"`
}

type RestoreResourcesOptsBuilder

type RestoreResourcesOptsBuilder interface {
	ToRestoreBackup() (map[string]interface{}, error)
}

Jump to

Keyboard shortcuts

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