crossmodel

package
v0.0.0-...-61a7a57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2017 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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

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.

func (*Client) Offer

func (c *Client) Offer(modelUUID, application string, endpoints []string, url string, desc string) ([]params.ErrorResult, error)

Offer prepares application's endpoints for consumption.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址