Documentation
¶
Index ¶
- type AddPendingResourcesArgs
- type CharmID
- type Client
- func (c Client) AddPendingResources(args AddPendingResourcesArgs) ([]string, error)
- func (c Client) ListResources(applications []string) ([]resource.ApplicationResources, error)
- func (c Client) Upload(application, name, filename string, reader io.ReadSeeker) error
- func (c Client) UploadPendingResource(application string, res charmresource.Resource, filename string, ...) (pendingID string, err 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 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 CharmID ¶
type CharmID struct {
// URL of the given charm, includes the reference name and a revision.
// Old style charm URLs are also supported i.e. charmstore.
URL *charm.URL
// Origin holds the origin of a charm. This includes the source of the
// charm, along with the revision and channel to identify where the charm
// originated from.
Origin apicharm.Origin
}
CharmID represents the underlying charm for a given application. This includes both the URL and the origin.
type Client ¶
type Client struct {
FacadeCaller
io.Closer
// contains filtered or unexported fields
}
Client is the public client for the resources API facade.
func (Client) AddPendingResources ¶
func (c Client) AddPendingResources(args AddPendingResourcesArgs) ([]string, error)
AddPendingResources sends the provided resource info up to Juju without making it available yet.
func (Client) ListResources ¶
func (c Client) ListResources(applications []string) ([]resource.ApplicationResources, error)
ListResources calls the ListResources API server method with the given application names.
func (Client) Upload ¶
func (c Client) Upload(application, name, filename string, reader io.ReadSeeker) error
Upload sends the provided resource blob up to Juju.
func (Client) UploadPendingResource ¶
func (c Client) UploadPendingResource(application string, res charmresource.Resource, filename string, reader io.ReadSeeker) (pendingID string, err error)
UploadPendingResource sends the provided resource blob up to Juju and makes it available.
type FacadeCaller ¶
type FacadeCaller interface {
FacadeCall(request string, params, response interface{}) error
BestAPIVersion() int
}
FacadeCaller has the api/base.FacadeCaller methods needed for the component.