This section is empty.


This section is empty.


This section is empty.


type Client

type Client struct {
	// contains filtered or unexported fields

Client wraps the backups API for the client.

func MakeClient

func MakeClient(frontend base.ClientFacade, backend base.FacadeCaller, client *httprequest.Client) *Client

MakeClient is a direct constructor function for a backups client.

func NewClient

func NewClient(st base.APICallCloser) (*Client, error)

NewClient returns a new backups API client.

func (*Client) Create

func (c *Client) Create(notes string, keepCopy, noDownload bool) (*params.BackupsMetadataResult, error)

Create sends a request to create a backup of juju's state. It returns the metadata associated with the resulting backup and a filename for download.

func (*Client) Download

func (c *Client) Download(id string) (io.ReadCloser, error)

Download returns an io.ReadCloser for the given backup id.

func (*Client) Info

Info implements the API method.

func (*Client) List

func (c *Client) List() (*params.BackupsListResult, error)

List implements the API method.

func (*Client) Remove

func (c *Client) Remove(ids ...string) ([]params.ErrorResult, error)

func (*Client) Upload

func (c *Client) Upload(archive io.ReadSeeker, meta params.BackupsMetadataResult) (string, error)

Upload sends the backup archive to remote storage.