1
// Copyright 2014 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
10
"github.com/juju/errors"
11
"github.com/juju/httprequest"
13
"github.com/juju/juju/apiserver/params"
16
type downloadParams struct {
17
httprequest.Route `httprequest:"GET /backups"`
18
Body params.BackupsDownloadArgs `httprequest:",body"`
21
// Download returns an io.ReadCloser for the given backup id.
22
func (c *Client) Download(id string) (io.ReadCloser, error) {
24
var resp *http.Response
27
Body: params.BackupsDownloadArgs{
34
return nil, errors.Trace(err)