Documentation
¶
Index ¶
- func MakeOfferFromParams(offer params.ApplicationOffer) (crossmodel.ApplicationOffer, error)
- func MakeOfferedApplicationFromParams(offer params.OfferedApplication) crossmodel.OfferedApplication
- func MakeParamsFromOffer(offer crossmodel.ApplicationOffer) params.ApplicationOffer
- type ApplicationOffersAPI
- type Client
- func (c *Client) ApplicationOffer(url string) (params.ApplicationOffer, error)
- func (c *Client) FindApplicationOffers(filters ...crossmodel.ApplicationOfferFilter) ([]params.ApplicationOffer, error)
- func (c *Client) ListOffers(filters ...crossmodel.OfferedApplicationFilter) ([]crossmodel.OfferedApplicationDetailsResult, error)
- func (c *Client) Offer(modelUUID, application string, endpoints []string, url string, desc string) ([]params.ErrorResult, error)
- type OfferedApplicationAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeOfferFromParams ¶
func MakeOfferFromParams(offer params.ApplicationOffer) (crossmodel.ApplicationOffer, error)
MakeOfferFromParams creates a ApplicationOffer from api parameters.
func MakeOfferedApplicationFromParams ¶
func MakeOfferedApplicationFromParams(offer params.OfferedApplication) crossmodel.OfferedApplication
MakeOfferedApplicationFromParams creates an OfferedApplication from api parameters.
func MakeParamsFromOffer ¶
func MakeParamsFromOffer(offer crossmodel.ApplicationOffer) params.ApplicationOffer
MakeParamsFromOffer creates api parameters from a ApplicationOffer.
Types ¶
type ApplicationOffersAPI ¶
type ApplicationOffersAPI interface {
// AddOffer adds a new application offering to a application directory.
// The offer's application URL scheme determines the directory to
// which the offer is added.
AddOffer(offer crossmodel.ApplicationOffer, users []string) error
// List offers returns the offers contained in the specified directory,
// satisfying the specified filter. The directory is the same as the service
// URL scheme and is used to determine which backend to query.
ListOffers(directory string, filters ...crossmodel.ApplicationOfferFilter) ([]crossmodel.ApplicationOffer, error)
}
ApplicationOffersAPI instances provides access to application offerings from external environments.
func NewApplicationOffers ¶
func NewApplicationOffers(st base.APICallCloser) ApplicationOffersAPI
NewApplicationOffers creates a new client for accessing a controller application directory API.
type Client ¶
type Client struct {
base.ClientFacade
// contains filtered or unexported fields
}
Client allows access to the cross model management API end points.
func NewClient ¶
func NewClient(st base.APICallCloser) *Client
NewClient creates a new client for accessing the cross model relations API.
func (*Client) ApplicationOffer ¶
func (c *Client) ApplicationOffer(url string) (params.ApplicationOffer, error)
ApplicationOffer returns offered remote application details for a given URL.
func (*Client) FindApplicationOffers ¶
func (c *Client) FindApplicationOffers(filters ...crossmodel.ApplicationOfferFilter) ([]params.ApplicationOffer, error)
FindApplicationOffers returns all application offers matching the supplied filter.
func (*Client) ListOffers ¶
func (c *Client) ListOffers(filters ...crossmodel.OfferedApplicationFilter) ([]crossmodel.OfferedApplicationDetailsResult, error)
ListOffers gets all remote applications that have been offered from this Juju model. Each returned application satisfies at least one of the the specified filters.
type OfferedApplicationAPI ¶
type OfferedApplicationAPI interface {
// OfferedApplications returns the offered applications for the specified urls.
// The results and any errors are keyed by URL.
OfferedApplications(applicationURLs ...string) (map[string]crossmodel.OfferedApplication, map[string]error, error)
// WatchOfferedApplications starts a watcher for changes to the offered
// services from this environment.
WatchOfferedApplications() (watcher.StringsWatcher, error)
}
OfferedApplicationAPI provides access to application offerings from this environment.
func NewOfferedApplications ¶
func NewOfferedApplications(st base.APICallCloser) OfferedApplicationAPI
NewOfferedApplications creates a new client for accessing an offered applications API.