Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req CreateRequest) (string, error)
- func (c *Client) Delete(ctx context.Context, req DeleteRequest) (string, error)
- func (c *Client) Find(ctx context.Context, req FindRequest) ([]map[string]interface{}, error)
- func (c *Client) GetSnapshotConfig(ctx context.Context, req GetSnapshotConfigRequest) (map[string]interface{}, error)
- func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
- func (c *Client) Rollback(ctx context.Context, req RollbackRequest) (string, error)
- func (c *Client) UpdateSnapshotConfig(ctx context.Context, req UpdateSnapshotConfigRequest) error
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type GetSnapshotConfigRequest
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type RollbackRequest
- type UpdateSnapshotConfigRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) GetSnapshotConfig ¶
func (c *Client) GetSnapshotConfig(ctx context.Context, req GetSnapshotConfigRequest) (map[string]interface{}, error)
GetSnapshotConfig Get snapshot configuration
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
Index List all snapshots.
func (*Client) UpdateSnapshotConfig ¶
func (c *Client) UpdateSnapshotConfig(ctx context.Context, req UpdateSnapshotConfigRequest) error
UpdateSnapshotConfig Update snapshot metadata.
type CreateRequest ¶
type CreateRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Snapname string `url:"snapname" json:"snapname"` // The name of the snapshot. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Description *string `url:"description,omitempty" json:"description,omitempty"` // A textual description or comment. Vmstate *util.PVEBool `url:"vmstate,omitempty" json:"vmstate,omitempty"` // Save the vmstate }
type DeleteRequest ¶
type DeleteRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Snapname string `url:"snapname" json:"snapname"` // The name of the snapshot. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Force *util.PVEBool `url:"force,omitempty" json:"force,omitempty"` // For removal from config file, even if removing disk snapshots fails. }
type FindRequest ¶
type HTTPClient ¶
type IndexRequest ¶
type IndexResponse ¶
type IndexResponse struct { Description string `url:"description" json:"description"` // Snapshot description. Name string `url:"name" json:"name"` // Snapshot identifier. Value 'current' identifies the current VM. // The following parameters are optional Parent *string `url:"parent,omitempty" json:"parent,omitempty"` // Parent snapshot identifier. Snaptime *int `url:"snaptime,omitempty" json:"snaptime,omitempty"` // Snapshot creation time Vmstate *util.PVEBool `url:"vmstate,omitempty" json:"vmstate,omitempty"` // Snapshot includes RAM. }
type RollbackRequest ¶
type RollbackRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Snapname string `url:"snapname" json:"snapname"` // The name of the snapshot. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Start *util.PVEBool `url:"start,omitempty" json:"start,omitempty"` // Whether the VM should get started after rolling back successfully. (Note: VMs will be automatically started if the snapshot includes RAM.) }
type UpdateSnapshotConfigRequest ¶
type UpdateSnapshotConfigRequest struct { Node string `url:"node" json:"node"` // The cluster node name. Snapname string `url:"snapname" json:"snapname"` // The name of the snapshot. Vmid int `url:"vmid" json:"vmid"` // The (unique) ID of the VM. // The following parameters are optional Description *string `url:"description,omitempty" json:"description,omitempty"` // A textual description or comment. }
Click to show internal directories.
Click to hide internal directories.