Documentation ¶
Index ¶
- type AddPendingResourcesArgs
- type Client
- func (c Client) AddPendingResource(applicationID string, res charmresource.Resource, filename string, ...) (pendingID string, err error)
- func (c Client) AddPendingResources(args AddPendingResourcesArgs) (pendingIDs []string, err error)
- func (c Client) ListResources(services []string) ([]resource.ServiceResources, error)
- func (c Client) Upload(service, name, filename string, reader io.ReadSeeker) error
- type Doer
- type FacadeCaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPendingResourcesArgs ¶
type AddPendingResourcesArgs struct { // ApplicationID identifies the application being deployed. ApplicationID string // CharmID identifies the application's charm. CharmID charmstore.CharmID // CharmStoreMacaroon is the macaroon to use for the charm when // interacting with the charm store. CharmStoreMacaroon *macaroon.Macaroon // Resources holds the charm store info for each of the resources // that should be added/updated on the controller. Resources []charmresource.Resource }
AddPendingResourcesArgs holds the arguments to AddPendingResources().
type Client ¶
type Client struct { FacadeCaller io.Closer // contains filtered or unexported fields }
Client is the public client for the resources API facade.
func NewClient ¶
func NewClient(caller FacadeCaller, doer Doer, closer io.Closer) *Client
NewClient returns a new Client for the given raw API caller.
func (Client) AddPendingResource ¶
func (c Client) AddPendingResource(applicationID string, res charmresource.Resource, filename string, reader io.ReadSeeker) (pendingID string, err error)
AddPendingResource sends the provided resource blob up to Juju without making it available yet. For example, AddPendingResource() is used before the application is deployed.
func (Client) AddPendingResources ¶
func (c Client) AddPendingResources(args AddPendingResourcesArgs) (pendingIDs []string, err error)
AddPendingResources sends the provided resource info up to Juju without making it available yet.
func (Client) ListResources ¶
func (c Client) ListResources(services []string) ([]resource.ServiceResources, error)
ListResources calls the ListResources API server method with the given application names.
type Doer ¶
type Doer interface {
Do(req *http.Request, body io.ReadSeeker, resp interface{}) error
}
Doer
type FacadeCaller ¶
FacadeCaller has the api/base.FacadeCaller methods needed for the component.