backups

package
Version: v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListRestoreTime

func ListRestoreTime(client *gophercloud.ServiceClient, opts ListRestoreTimeBuilder, instanceId string) pagination.Pager

Types

type AutoBackupsPolicyBuilder

type AutoBackupsPolicyBuilder interface {
	AutoBackupsPolicyMap() (map[string]interface{}, error)
}

type AutoBackupsPolicyOpts

type AutoBackupsPolicyOpts struct {
	BackupPolicy *BackupsPolicy `json:"backup_policy"  required:"true"`
}

func (AutoBackupsPolicyOpts) AutoBackupsPolicyMap

func (opts AutoBackupsPolicyOpts) AutoBackupsPolicyMap() (map[string]interface{}, error)

type Backup

type Backup struct {
	Id          string `json:"id"`
	Instanceid  string `json:"instance_id" `
	Name        string `json:"name" `
	Description string `json:"description" `
	Databases   string `json:"databases" `
	Begintime   string `json:"begin_time"`
	Status      string `json:"status" `
	Type        string `json:"type" `
}

type BackupFilesBuilder

type BackupFilesBuilder interface {
	ToBackupFilesListQuery() (string, error)
}

type BackupStrategy

type BackupStrategy struct {
	StartTime string `json:"start_time" required:"true"`
	KeepDays  int    `json:"keep_days,omitempty"`
}

type BackupsFile

type BackupsFile struct {
	DownloadLink    string `json:"download_link"`
	Name            string `json:"name"`
	LinkExpiredLink string `json:"link_expired_time"`
	Size            int64  `json:"size"`
}

type BackupsFilesPage

type BackupsFilesPage struct {
	pagination.Offset
}

func (BackupsFilesPage) IsEmpty

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

type BackupsFilesResp

type BackupsFilesResp struct {
	FilesList []BackupsFile `json:"files"`
	Bucket    string        `json:"bucket"`
}

func ExtractBackupsFiles

func ExtractBackupsFiles(r pagination.Page) (BackupsFilesResp, error)

type BackupsPage

type BackupsPage struct {
	pagination.Offset
}

func (BackupsPage) IsEmpty

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

type BackupsPolicy

type BackupsPolicy struct {
	KeepDays  *int   `json:"keep_days"  required:"true"`
	StartTime string `json:"start_time,omitempty"`
	Period    string `json:"period,omitempty"`
}

type BackupsPolicyResult

type BackupsPolicyResult struct {
	gophercloud.Result
}

func GetPolicy

func GetPolicy(client *gophercloud.ServiceClient, instancesID string) (r BackupsPolicyResult)

func (BackupsPolicyResult) Extract

type BackupsResp

type BackupsResp struct {
	Id         string    `json:"id" `
	Name       string    `json:"name"`
	Type       string    `json:"type"`
	Size       int64     `json:"size"`
	Status     string    `json:"status"`
	BeginTime  string    `json:"begin_time"`
	EndTime    string    `json:"end_time"`
	Datastore  Datastore `json:"datastore"`
	Databases  Databases `json:"databases"`
	InstanceId string    `json:"instance_id"`
}

type CreateBackupsBuilder

type CreateBackupsBuilder interface {
	CreateBackupsMap() (map[string]interface{}, error)
}

type CreateBackupsOpts

type CreateBackupsOpts struct {
	InstanceId  string      `json:"instance_id"  required:"true"`
	Name        string      `json:"name" required:"true"`
	Description string      `json:"description,omitempty"`
	Databases   []Databases `json:"databases,omitempty"`
}

func (CreateBackupsOpts) CreateBackupsMap

func (opts CreateBackupsOpts) CreateBackupsMap() (map[string]interface{}, error)

type CreateBackupsResp

type CreateBackupsResp struct {
	Backup `json:"backup"`
}

type CreateBackupsResult

type CreateBackupsResult struct {
	// contains filtered or unexported fields
}

func (CreateBackupsResult) Extract

type Databases

type Databases struct {
	Name string `json:"name" required:"true"`
}

type Datastore

type Datastore struct {
	Type    string `json:"type"`
	Version string `json:"version"`
}

type DeletetBackupsResult

type DeletetBackupsResult struct {
	gophercloud.ErrResult
}

func Delete

func Delete(client *gophercloud.ServiceClient, backupid string) (r DeletetBackupsResult)

type Ha

type Ha struct {
	Mode            string `json:"mode" required:"true"`
	ReplicationMode string `json:"replication_mode" required:"true"`
}

type ListAutoBackupsPolicyResp

type ListAutoBackupsPolicyResp struct {
	ListBackupsPolicy `json:"backup_policy"`
}

type ListBackupFilesOpts

type ListBackupFilesOpts struct {
	BackupId string `q:"backup_id"`
}

func (ListBackupFilesOpts) ToBackupFilesListQuery

func (opts ListBackupFilesOpts) ToBackupFilesListQuery() (string, error)

type ListBackupsBuilder

type ListBackupsBuilder interface {
	ToBackupsListQuery() (string, error)
}

type ListBackupsOpts

type ListBackupsOpts struct {
	InstanceId string `q:"instance_id" `
	BackupId   string `q:"backup_id"`
	BackupType string `q:"backup_type"`
	Offset     int    `q:"offset"`
	Limit      int    `q:"limit"`
	BeginTime  int    `q:"begin_time"`
	EndTime    int    `q:"end_time"`
}

func (ListBackupsOpts) ToBackupsListQuery

func (opts ListBackupsOpts) ToBackupsListQuery() (string, error)

type ListBackupsPolicy

type ListBackupsPolicy struct {
	KeepDays  int    `json:"keep_days"`
	StartTime string `json:"start_time"`
	Period    string `json:"period"`
}

type ListBackupsPolicyResult

type ListBackupsPolicyResult struct {
	gophercloud.ErrResult
}

func UpdatePolicy

func UpdatePolicy(client *gophercloud.ServiceClient, opts AutoBackupsPolicyBuilder, instancesID string) (r ListBackupsPolicyResult)

type ListBackupsResp

type ListBackupsResp struct {
	Backups    []BackupsResp `json:"backups"`
	TotalCount int           `json:"total_count"`
}

func ExtractBackups

func ExtractBackups(r pagination.Page) (ListBackupsResp, error)

type ListRestoreTimeBuilder

type ListRestoreTimeBuilder interface {
	ToRestoreTimeListQuery() (string, error)
}

type ListRestoreTimeOpts

type ListRestoreTimeOpts struct {
	Date string `q:"date"`
}

func (ListRestoreTimeOpts) ToRestoreTimeListQuery

func (opts ListRestoreTimeOpts) ToRestoreTimeListQuery() (string, error)

type RecoveryBuilder

type RecoveryBuilder interface {
	ToRecoveryMap() (map[string]interface{}, error)
}

type RecoveryOpts

type RecoveryOpts struct {
	Source Source `json:"source"  required:"true"`
	Target Target `json:"target" required:"true"`
}

func (RecoveryOpts) ToRecoveryMap

func (opts RecoveryOpts) ToRecoveryMap() (map[string]interface{}, error)

type RecoveryResp

type RecoveryResp struct {
	JobId string `json:"job_id"`
}

type RecoveryResult

type RecoveryResult struct {
	// contains filtered or unexported fields
}

func Recovery

func Recovery(client *gophercloud.ServiceClient, opts RecoveryBuilder) (r RecoveryResult)

func (RecoveryResult) Extract

func (r RecoveryResult) Extract() (*RecoveryResp, error)

type RestoreInstanceResp

type RestoreInstanceResp struct {
	ID                   string         `json:"id" `
	Name                 string         `json:"name"`
	Status               string         `json:"status"`
	Datastore            Datastore      `json:"datastore"`
	Ha                   Ha             `json:"ha"`
	ConfigurationId      string         `json:"configuration_id"`
	Port                 string         `json:"port"`
	Password             string         `json:"password"`
	BackupStrategy       BackupStrategy `json:"backup_strategy"`
	EnterpriseProjectTag string         `json:"enterprise_project_tag"`
	DiskEncryptionId     string         `json:"disk_encryption_id"`
	FlavorRef            string         `json:"flavor_ref"`
	Volume               Volume         `json:"volume"`
	Region               string         `json:"region"`
	AvailabilityZone     string         `json:"availability_zone"`
	VpcId                string         `json:"vpc_id"`
	SubnetId             string         `json:"subnet_id"`
	SecurityGroupid      string         `json:"security_group_id" `
}

type RestoreNewRdsBuilder

type RestoreNewRdsBuilder interface {
	RestoreNewRdsMap() (map[string]interface{}, error)
}

type RestoreNewRdsInstanceResp

type RestoreNewRdsInstanceResp struct {
	Instance RestoreInstanceResp `json:"instance" `
	JobId    string              `json:"job_id" `
}

type RestoreNewRdsOpts

type RestoreNewRdsOpts struct {
	Name                string          `json:"name"  required:"true"`
	Ha                  *Ha             `json:"ha,omitempty"`
	ConfigurationId     string          `json:"configuration_id,omitempty"`
	Port                string          `json:"port,omitempty"`
	Password            string          `json:"password" required:"true"`
	BackupStrategy      *BackupStrategy `json:"backup_strategy,omitempty"`
	EnterpriseProjectId string          `json:"enterprise_project_id,omitempty"`
	DiskEncryptionId    string          `json:"disk_encryption_id,omitempty"`
	FlavorRef           string          `json:"flavor_ref" required:"true"`
	Volume              *Volume         `json:"volume" required:"true"`
	AvailabilityZone    string          `json:"availability_zone" required:"true"`
	VpcId               string          `json:"vpc_id" required:"true"`
	SubnetId            string          `json:"subnet_id" required:"true"`
	SecurityGroupId     string          `json:"security_group_id" required:"true"`
	RestorePoint        *RestorePoint   `json:"restore_point" required:"true"`
	TimeZone            string          `json:"time_zone,omitempty"`
}

func (RestoreNewRdsOpts) RestoreNewRdsMap

func (opts RestoreNewRdsOpts) RestoreNewRdsMap() (map[string]interface{}, error)

type RestoreNewRdsResult

type RestoreNewRdsResult struct {
	// contains filtered or unexported fields
}

func (RestoreNewRdsResult) Extract

type RestorePoint

type RestorePoint struct {
	InstanceId   string            `json:"instance_id" required:"true"`
	Type         string            `json:"type" required:"true"`
	BackupId     string            `json:"backup_id,omitempty"`
	RestoreTime  int               `json:"restore_time,omitempty" `
	DatabaseName map[string]string `json:"database_name,omitempty" `
}

type RestoreTime

type RestoreTime struct {
	StartTime int `json:"start_time"`
	EndTime   int `json:"end_time"`
}

type RestoreTimePage

type RestoreTimePage struct {
	pagination.Offset
}

func (RestoreTimePage) IsEmpty

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

type RestoreTimeResp

type RestoreTimeResp struct {
	RestoreTimeList []RestoreTime `json:"restore_time"`
}

func ExtractRestoreTime

func ExtractRestoreTime(r pagination.Page) (RestoreTimeResp, error)

type Source

type Source struct {
	InstanceId   string            `json:"instance_id"`
	Type         string            `json:"type,omitempty"`
	BackupId     string            `json:"backup_id,omitempty"`
	RestoreTime  int               `json:"restore_time,omitempty" `
	DatabaseName map[string]string `json:"database_name,omitempty"`
}

type Target

type Target struct {
	InstanceId string `json:"instance_id" required:"true"`
}

type Volume

type Volume struct {
	Type string `json:"type" required:"true"`
	Size int    `json:"size" required:"true"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL