Documentation ¶
Index ¶
- func ConvertParamsOrigin(origin params.CharmOrigin) (corecharm.Origin, error)
- func Register(registry facade.FacadeRegistry)
- type API
- func (a *API) AddCharm(ctx context.Context, args params.AddCharmWithOrigin) (params.CharmOriginResult, error)
- func (a *API) CharmInfo(ctx context.Context, args params.CharmURL) (params.Charm, error)
- func (a *API) CheckCharmPlacement(ctx context.Context, args params.ApplicationCharmPlacements) (params.ErrorResults, error)
- func (a *API) GetDownloadInfos(ctx context.Context, args params.CharmURLAndOrigins) (params.DownloadInfoResults, error)
- func (a *API) List(ctx context.Context, args params.CharmsList) (params.CharmsListResult, error)
- func (a *API) ListCharmResources(ctx context.Context, args params.CharmURLAndOrigins) (params.CharmResourcesResults, error)
- func (a *API) ResolveCharms(ctx context.Context, args params.ResolveCharmsWithChannel) (params.ResolveCharmWithChannelResults, error)
- type APIv7
- type ApplicationService
- type MachineService
- type ModelConfigService
- type StoreCharm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertParamsOrigin ¶
func ConvertParamsOrigin(origin params.CharmOrigin) (corecharm.Origin, error)
ConvertParamsOrigin converts a params struct to a core charm origin.
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API implements the charms interface and is the concrete implementation of the API end point.
func (*API) AddCharm ¶
func (a *API) AddCharm(ctx context.Context, args params.AddCharmWithOrigin) (params.CharmOriginResult, error)
AddCharm adds the given charm URL (which must include revision) to the environment, if it does not exist yet. Local charms are not supported, only charm store and charm hub URLs. See also AddLocalCharm().
func (*API) CheckCharmPlacement ¶
func (a *API) CheckCharmPlacement(ctx context.Context, args params.ApplicationCharmPlacements) (params.ErrorResults, error)
CheckCharmPlacement checks if a charm is allowed to be placed with in a given application.
func (*API) GetDownloadInfos ¶
func (a *API) GetDownloadInfos(ctx context.Context, args params.CharmURLAndOrigins) (params.DownloadInfoResults, error)
GetDownloadInfos attempts to get the bundle corresponding to the charm url and origin.
func (*API) List ¶
func (a *API) List(ctx context.Context, args params.CharmsList) (params.CharmsListResult, error)
List returns a list of charm URLs currently in the state. If supplied parameter contains any names, the result will be filtered to return only the charms with supplied names. The order of the charms is not guaranteed to be the same as the order of the names passed in.
func (*API) ListCharmResources ¶
func (a *API) ListCharmResources(ctx context.Context, args params.CharmURLAndOrigins) (params.CharmResourcesResults, error)
ListCharmResources returns a series of resources for a given charm.
func (*API) ResolveCharms ¶
func (a *API) ResolveCharms(ctx context.Context, args params.ResolveCharmsWithChannel) (params.ResolveCharmWithChannelResults, error)
ResolveCharms resolves the given charm URLs with an optionally specified preferred channel. Channel provided via CharmOrigin.
type ApplicationService ¶
type ApplicationService interface { // SetCharm persists the charm metadata, actions, config and manifest to // state. // If there are any non-blocking issues with the charm metadata, actions, // config or manifest, a set of warnings will be returned. SetCharm(ctx context.Context, args charm.SetCharmArgs) (corecharm.ID, []string, error) // ListCharmsWithOriginByNames returns a list of charms with the specified // origin by the name. If no names are provided, all charms are returned. We // require the origin, so we can reconstruct the charm URL for the client // response. ListCharmsWithOriginByNames(ctx context.Context, names ...string) ([]charm.CharmWithOrigin, error) }
ApplicationService provides access to application related operations, this includes charms, units and resources.
type MachineService ¶
type MachineService interface { // GetMachineUUID returns the UUID of a machine identified by its name. GetMachineUUID(ctx context.Context, name machine.Name) (string, error) // HardwareCharacteristics returns the hardware characteristics of the // specified machine. HardwareCharacteristics(ctx context.Context, machineUUID string) (*instance.HardwareCharacteristics, error) }
MachineService defines the methods that the facade assumes from the Machine service.
type ModelConfigService ¶
type ModelConfigService interface { // ModelConfig returns the current config for the model. ModelConfig(context.Context) (*config.Config, error) }
ModelConfigService provides access to the model configuration.
type StoreCharm ¶
type StoreCharm interface { charm.Charm charm.LXDProfiler Version() string }
StoreCharm represents a store charm.
Directories ¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |