snapshots

package
v0.9.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

func WaitForStatus

func WaitForStatus(c *golangsdk.ServiceClient, id, status string, secs int) error

WaitForStatus will continually poll the resource, checking for a particular status. It will do this for the amount of seconds defined.

Types

type CreateOpts

type CreateOpts struct {
	VolumeID    string            `json:"volume_id" required:"true"`
	Force       bool              `json:"force,omitempty"`
	Name        string            `json:"name,omitempty"`
	Description string            `json:"description,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
}

type ListOpts

type ListOpts struct {
	Name     string `q:"name"`
	Status   string `q:"status"`
	VolumeID string `q:"volume_id"`
	ID       string `q:"id"`
}

type ListResponse added in v0.9.7

type ListResponse struct {
	Snapshots []Snapshot `json:"snapshots"`
}

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) (*ListResponse, error)

type RollbackInfo added in v0.9.7

type RollbackInfo struct {
	VolumeID string `json:"volume_id"`
}

func Rollback added in v0.9.7

func Rollback(client *golangsdk.ServiceClient, snapshotID string, opts RollbackOpts) (*RollbackInfo, error)

type RollbackOpts added in v0.9.7

type RollbackOpts struct {
	VolumeID string `json:"volume_id" required:"true"`
	Name     string `json:"name,omitempty"`
}

type RollbackResponse added in v0.9.7

type RollbackResponse struct {
	Rollback RollbackInfo `json:"rollback"`
}

type Snapshot

type Snapshot struct {
	ID          string            `json:"id"`
	CreatedAt   time.Time         `json:"-"`
	UpdatedAt   time.Time         `json:"-"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	VolumeID    string            `json:"volume_id"`
	Status      string            `json:"status"`
	Size        int               `json:"size"`
	Metadata    map[string]string `json:"metadata"`
}

func Create

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

func Get

func Get(client *golangsdk.ServiceClient, id string) (*Snapshot, error)

func Update

func Update(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*Snapshot, error)

func (*Snapshot) UnmarshalJSON

func (r *Snapshot) UnmarshalJSON(b []byte) error

type UpdateOpts

type UpdateOpts struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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