Documentation
¶
Index ¶
- Variables
- func Register(registry facade.FacadeRegistry)
- type Backend
- type BaseAPI
- type Model
- type OfferConnection
- type OffersAPIv4
- type OffersAPIv5
- func (api *OffersAPIv5) ApplicationOffers(urls params.OfferURLs) (params.ApplicationOffersResults, error)
- func (api *OffersAPIv5) DestroyOffers(args params.DestroyApplicationOffers) (params.ErrorResults, error)
- func (api *OffersAPIv5) FindApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResultsV5, error)
- func (api *OffersAPIv5) GetConsumeDetails(args params.ConsumeOfferDetailsArg) (params.ConsumeOfferDetailsResults, error)
- func (api *OffersAPIv5) ListApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResultsV5, error)
- func (api *OffersAPIv5) ModifyOfferAccess(args params.ModifyOfferAccessRequest) (result params.ErrorResults, _ error)
- func (api *OffersAPIv5) Offer(all params.AddApplicationOffers) (params.ErrorResults, error)
- func (api *OffersAPIv5) RemoteApplicationInfo(args params.OfferURLs) (params.RemoteApplicationInfoResults, error)
- type Space
- type StatePool
- type User
Constants ¶
This section is empty.
Variables ¶
var GetApplicationOffers = func(backend interface{}) crossmodel.ApplicationOffers { switch st := backend.(type) { case *state.State: return state.NewApplicationOffers(st) case *stateShim: return state.NewApplicationOffers(st.st) } return nil }
var GetStateAccess = func(st *state.State) Backend { return &stateShim{ st: st, Backend: commoncrossmodel.GetBackend(st), } }
var GetStatePool = func(sp *state.StatePool) StatePool {
return &statePoolShim{sp}
}
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type Backend ¶
type Backend interface { commoncrossmodel.Backend Charm(string) (commoncrossmodel.Charm, error) ApplicationOffer(name string) (*crossmodel.ApplicationOffer, error) Model() (Model, error) OfferConnections(string) ([]OfferConnection, error) SpaceByName(string) (Space, error) User(names.UserTag) (User, error) CreateOfferAccess(offer names.ApplicationOfferTag, user names.UserTag, access permission.Access) error UpdateOfferAccess(offer names.ApplicationOfferTag, user names.UserTag, access permission.Access) error RemoveOfferAccess(offer names.ApplicationOfferTag, user names.UserTag) error GetOfferUsers(offerUUID string) (map[string]permission.Access, error) // GetModelCallContext gets everything that is needed to make cloud calls on behalf of the state current model. GetModelCallContext() context.ProviderCallContext AllSpaceInfos() (network.SpaceInfos, error) }
Backend provides selected methods off the state.State struct.
type BaseAPI ¶
type BaseAPI struct { Authorizer facade.Authorizer GetApplicationOffers func(interface{}) jujucrossmodel.ApplicationOffers ControllerModel Backend StatePool StatePool // contains filtered or unexported fields }
BaseAPI provides various boilerplate methods used by the facade business logic.
type OfferConnection ¶
type OffersAPIv4 ¶
type OffersAPIv4 struct {
OffersAPIv5
}
OffersAPIv4 implements the cross model interface and is the concrete implementation of the api end point.
func (*OffersAPIv4) ListApplicationOffers ¶
func (api *OffersAPIv4) ListApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResultsV4, error)
ListApplicationOffers gets deployed details about application offers that match given filter. The results contain details about the deployed applications such as connection count.
type OffersAPIv5 ¶
type OffersAPIv5 struct { BaseAPI // contains filtered or unexported fields }
OffersAPIv5 implements the cross model interface and is the concrete implementation of the api end point.
func (*OffersAPIv5) ApplicationOffers ¶
func (api *OffersAPIv5) ApplicationOffers(urls params.OfferURLs) (params.ApplicationOffersResults, error)
ApplicationOffers gets details about remote applications that match given URLs.
func (*OffersAPIv5) DestroyOffers ¶
func (api *OffersAPIv5) DestroyOffers(args params.DestroyApplicationOffers) (params.ErrorResults, error)
DestroyOffers removes the offers specified by the given URLs, forcing if necessary.
func (*OffersAPIv5) FindApplicationOffers ¶
func (api *OffersAPIv5) FindApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResultsV5, error)
FindApplicationOffers gets details about remote applications that match given filter.
func (*OffersAPIv5) GetConsumeDetails ¶
func (api *OffersAPIv5) GetConsumeDetails(args params.ConsumeOfferDetailsArg) (params.ConsumeOfferDetailsResults, error)
GetConsumeDetails returns the details necessary to pass to another model to allow the specified args user to consume the offers represented by the args URLs.
func (*OffersAPIv5) ListApplicationOffers ¶
func (api *OffersAPIv5) ListApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResultsV5, error)
ListApplicationOffers gets deployed details about application offers that match given filter. The results contain details about the deployed applications such as connection count.
func (*OffersAPIv5) ModifyOfferAccess ¶
func (api *OffersAPIv5) ModifyOfferAccess(args params.ModifyOfferAccessRequest) (result params.ErrorResults, _ error)
ModifyOfferAccess changes the application offer access granted to users.
func (*OffersAPIv5) Offer ¶
func (api *OffersAPIv5) Offer(all params.AddApplicationOffers) (params.ErrorResults, error)
Offer makes application endpoints available for consumption at a specified URL.
func (*OffersAPIv5) RemoteApplicationInfo ¶
func (api *OffersAPIv5) RemoteApplicationInfo(args params.OfferURLs) (params.RemoteApplicationInfoResults, error)
RemoteApplicationInfo returns information about the requested remote application. This call currently has no client side API, only there for the Dashboard at this stage.