Documentation ¶
Index ¶
- Variables
- type Backend
- type BaseAPI
- type Model
- type OfferConnection
- type OffersAPI
- func (api *OffersAPI) ApplicationOffers(urls params.OfferURLs) (params.ApplicationOffersResults, error)
- func (api *OffersAPI) DestroyOffers(args params.DestroyApplicationOffers) (params.ErrorResults, error)
- func (api *OffersAPI) FindApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResults, error)
- func (api *OffersAPI) GetConsumeDetails(args params.OfferURLs) (params.ConsumeOfferDetailsResults, error)
- func (api *OffersAPI) ListApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResults, error)
- func (api *OffersAPI) ModifyOfferAccess(args params.ModifyOfferAccessRequest) (result params.ErrorResults, _ error)
- func (api *OffersAPI) Offer(all params.AddApplicationOffers) (params.ErrorResults, error)
- func (api *OffersAPI) RemoteApplicationInfo(args params.OfferURLs) (params.RemoteApplicationInfoResults, error)
- type OffersAPIV2
- type OffersAPIV3
- type Space
- type StatePool
- type Subnet
- 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 ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { commoncrossmodel.Backend Charm(*charm.URL) (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 OffersAPI ¶
type OffersAPI struct { BaseAPI // contains filtered or unexported fields }
OffersAPI implements the cross model interface and is the concrete implementation of the api end point.
func NewOffersAPI ¶
NewOffersAPIV2 returns a new application offers OffersAPIV2 facade.
func (*OffersAPI) ApplicationOffers ¶
func (api *OffersAPI) ApplicationOffers(urls params.OfferURLs) (params.ApplicationOffersResults, error)
ApplicationOffers gets details about remote applications that match given URLs.
func (*OffersAPI) DestroyOffers ¶
func (api *OffersAPI) DestroyOffers(args params.DestroyApplicationOffers) (params.ErrorResults, error)
DestroyOffers removes the offers specified by the given URLs.
func (*OffersAPI) FindApplicationOffers ¶
func (api *OffersAPI) FindApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResults, error)
FindApplicationOffers gets details about remote applications that match given filter.
func (*OffersAPI) GetConsumeDetails ¶
func (api *OffersAPI) GetConsumeDetails(args params.OfferURLs) (params.ConsumeOfferDetailsResults, error)
GetConsumeDetails returns the details necessary to pass to another model to consume the specified offers represented by the urls.
func (*OffersAPI) ListApplicationOffers ¶
func (api *OffersAPI) ListApplicationOffers(filters params.OfferFilters) (params.QueryApplicationOffersResults, 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 (*OffersAPI) ModifyOfferAccess ¶
func (api *OffersAPI) ModifyOfferAccess(args params.ModifyOfferAccessRequest) (result params.ErrorResults, _ error)
ModifyOfferAccess changes the application offer access granted to users.
func (*OffersAPI) Offer ¶
func (api *OffersAPI) Offer(all params.AddApplicationOffers) (params.ErrorResults, error)
Offer makes application endpoints available for consumption at a specified URL.
func (*OffersAPI) RemoteApplicationInfo ¶
func (api *OffersAPI) 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.
type OffersAPIV2 ¶
type OffersAPIV2 struct {
*OffersAPI
}
OffersAPIV2 implements the cross model interface V2.
func NewOffersAPIV2 ¶
func NewOffersAPIV2(ctx facade.Context) (*OffersAPIV2, error)
NewOffersAPIV2 returns a new application offers OffersAPIV2 facade.
func (*OffersAPIV2) DestroyOffers ¶
func (api *OffersAPIV2) DestroyOffers(args params.DestroyApplicationOffers) (params.ErrorResults, error)
DestroyOffers removes the offers specified by the given URLs, forcing if necessary.
type OffersAPIV3 ¶
type OffersAPIV3 struct {
*OffersAPIV2
}
OffersAPIV3 implements the cross model interface V3.
func NewOffersAPIV3 ¶
func NewOffersAPIV3(ctx facade.Context) (*OffersAPIV3, error)
NewOffersAPIV3 returns a new application offers OffersAPIV3 facade.
func (*OffersAPIV3) GetConsumeDetails ¶
func (api *OffersAPIV3) 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.
type StatePool ¶
type StatePool interface { // Get returns a State for a given model from the pool. Get(modelUUID string) (Backend, func(), error) // Get returns a Model from the pool. GetModel(modelUUID string) (Model, func(), error) }
StatePool provides the subset of a state pool.