Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type ApplicationService ¶
type ApplicationService interface { // GetApplicationIDByName returns an application ID by application name. It // returns an error if the application can not be found by the name. GetApplicationIDByName(ctx context.Context, name string) (coreapplication.ID, error) // GetApplicationIDByUnitName returns the application ID for the named unit. It // returns an error if the unit is not found by the name GetApplicationIDByUnitName(ctx context.Context, unitName coreunit.Name) (coreapplication.ID, error) }
ApplicationService defines operations to retrieve application IDs based on application or unit names.
type ResourceService ¶
type ResourceService interface { // GetResourcesByApplicationID retrieves all resources associated with a given application ID in the specified context. GetResourcesByApplicationID(ctx context.Context, applicationID coreapplication.ID) ([]coreresource.Resource, error) }
ResourceService provides methods for managing resource data related to applications.
type UnitFacade ¶
type UnitFacade struct {
// contains filtered or unexported fields
}
UnitFacade is the resources portion of the uniter's API facade.
func NewUnitFacade ¶
func NewUnitFacade( appOrUnitTag names.Tag, applicationService ApplicationService, resourceService ResourceService, ) (*UnitFacade, error)
NewUnitFacade returns the resources portion of the uniter's API facade.
func (*UnitFacade) GetResourceInfo ¶
func (uf *UnitFacade) GetResourceInfo(ctx context.Context, args params.ListUnitResourcesArgs) (params. UnitResourcesResult, error)
GetResourceInfo returns the resource info for each of the given resource names (for the implicit application). If any one is missing then the corresponding result is set with errors.NotFound.
Click to show internal directories.
Click to hide internal directories.