Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(notes string) (*params.BackupsMetadataResult, error)
- func (c *Client) Download(id string) (io.ReadCloser, error)
- func (c *Client) Info(id string) (*params.BackupsMetadataResult, error)
- func (c *Client) List() (*params.BackupsListResult, error)
- func (c *Client) Remove(id string) error
- func (c *Client) Restore(backupId string, newClient ClientConnection) error
- func (c *Client) RestoreReader(r io.Reader, meta *params.BackupsMetadataResult, newClient ClientConnection) error
- func (c *Client) Upload(archive io.Reader, meta params.BackupsMetadataResult) (string, error)
- type ClientConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base.ClientFacade // contains filtered or unexported fields }
Client wraps the backups API for the client.
func (*Client) Create ¶
func (c *Client) Create(notes string) (*params.BackupsMetadataResult, error)
Create sends a request to create a backup of juju's state. It returns the metadata associated with the resulting backup.
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 ¶
func (c *Client) Info(id string) (*params.BackupsMetadataResult, error)
Info implements the API method.
func (*Client) List ¶
func (c *Client) List() (*params.BackupsListResult, error)
List implements the API method.
func (*Client) Restore ¶
func (c *Client) Restore(backupId string, newClient ClientConnection) error
Restore performs restore using a backup id corresponding to a backup stored in the server.
func (*Client) RestoreReader ¶
func (c *Client) RestoreReader(r io.Reader, meta *params.BackupsMetadataResult, newClient ClientConnection) error
RestoreReader restores the contents of backupFile as backup.
type ClientConnection ¶
ClientConnection type represents a function capable of spawning a new Client connection it is used to pass around connection factories when necessary. TODO(perrito666) This is a workaround for lp:1399722 .