Help us shape the future of Go! Take the 2026 Go Developer Survey

backup

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupInfo

type BackupInfo struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	BeginTime   string `json:"begin_time"`
	Status      string `json:"status"`
	Type        string `json:"type"`
	InstanceId  string `json:"instance_id"`
}

type BackupListInfo

type BackupListInfo struct {
	Id          string         `json:"id"`
	Name        string         `json:"name"`
	BeginTime   string         `json:"begin_time"`
	EndTime     string         `json:"end_time"`
	Status      string         `json:"status"`
	TakeUpTime  int            `json:"take_up_time"`
	Type        string         `json:"type"`
	Size        float64        `json:"size"`
	Datastore   MysqlDatastore `json:"datastore"`
	InstanceId  string         `json:"instance_id"`
	Description string         `json:"description"`
}

func ExtractBackups

func ExtractBackups(r pagination.NewPage) ([]BackupListInfo, error)

func List

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

type BackupPage

type BackupPage struct {
	pagination.NewSinglePageBase
}

type BackupPolicy

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

func GetPolicy

func GetPolicy(client *golangsdk.ServiceClient, instanceId string) (*BackupPolicy, error)

type CreateOpts

type CreateOpts struct {
	InstanceId  string `json:"instance_id" required:"true"`
	Name        string `json:"name" required:"true"`
	Description string `json:"description,omitempty"`
}

type CreateResponse

type CreateResponse struct {
	Backup BackupInfo `json:"backup"`
	JobId  string     `json:"job_id"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CreateResponse, error)

type DeleteResponse

type DeleteResponse struct {
	BackupId   string `json:"backup_id"`
	BackupName string `json:"backup_name"`
}

func Delete

func Delete(client *golangsdk.ServiceClient, backupID string) (*DeleteResponse, error)

type ListOpts

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

type ListResponse

type ListResponse struct {
	Backups    []BackupListInfo `json:"backups"`
	TotalCount int64            `json:"total_count"`
}

type MysqlDatastore

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

type UpdatePolicyOpts

type UpdatePolicyOpts struct {
	InstanceId               string `json:"-"`
	StartTime                string `json:"start_time" required:"true"`
	KeepDays                 int    `json:"keep_days" required:"true"`
	Period                   string `json:"period" required:"true"`
	RetentionNumBackupLevel1 *int   `json:"retention_num_backup_level-1,omitempty"`
}

type UpdatePolicyResponse

type UpdatePolicyResponse struct {
	Status       string `json:"status"`
	InstanceId   string `json:"instance_id"`
	InstanceName string `json:"instance_name"`
}

Jump to

Keyboard shortcuts

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