Documentation ¶
Index ¶
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) Download ¶
func (c *Client) Download(ctx context.Context, req DownloadRequest) (interface{}, error)
Download Extract a file or directory (as zip archive) from a PBS backup.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, req ListRequest) ([]ListResponse, error)
List List files and directories for single file restore under the given path.
type DownloadRequest ¶
type DownloadRequest struct { Filepath string `url:"filepath" json:"filepath"` // base64-path to the directory or file to download. Node string `url:"node" json:"node"` // The cluster node name. Storage string `url:"storage" json:"storage"` // The storage identifier. Volume string `url:"volume" json:"volume"` // Backup volume ID or name. Currently only PBS snapshots are supported. }
type HTTPClient ¶
type ListRequest ¶
type ListRequest struct { Filepath string `url:"filepath" json:"filepath"` // base64-path to the directory or file being listed, or "/". Node string `url:"node" json:"node"` // The cluster node name. Storage string `url:"storage" json:"storage"` // The storage identifier. Volume string `url:"volume" json:"volume"` // Backup volume ID or name. Currently only PBS snapshots are supported. }
type ListResponse ¶
type ListResponse struct { Filepath string `url:"filepath" json:"filepath"` // base64 path of the current entry Leaf util.PVEBool `url:"leaf" json:"leaf"` // If this entry is a leaf in the directory graph. Text string `url:"text" json:"text"` // Entry display text. Type string `url:"type" json:"type"` // Entry type. // The following parameters are optional Mtime *int `url:"mtime,omitempty" json:"mtime,omitempty"` // Entry last-modified time (unix timestamp). Size *int `url:"size,omitempty" json:"size,omitempty"` // Entry file size. }
Click to show internal directories.
Click to hide internal directories.