import "github.com/wallyworld/juju/cmd/juju/crossmodel"
find.go findformatter.go list.go listformatter.go offer.go remoteendpoints.go remove.go show.go showformatter.go
NewFindEndpointsCommand constructs command that allows to find offered application endpoints.
NewListEndpointsCommand constructs new list endpoint command.
NewOfferCommand constructs commands that enables endpoints for export.
NewRemoveOfferCommand returns a command used to remove a specified offer.
NewShowOfferedEndpointCommand constructs command that allows to show details of offered application's endpoint.
RelationStatusColor returns a context used to print the status with the relevant color.
type ApplicationOfferResult struct { // Access is the level of access the user has on the offer. Access string `yaml:"access" json:"access"` // Endpoints is the list of offered application endpoints. Endpoints map[string]RemoteEndpoint `yaml:"endpoints" json:"endpoints"` // Users are the users who can access the offer. Users map[string]OfferUser `yaml:"users,omitempty" json:"users,omitempty"` }
ApplicationOfferResult defines the serialization behaviour of an application offer. This is used in map-style yaml output where offer URL is the key.
type FindAPI interface { Close() error FindApplicationOffers(filters ...crossmodel.ApplicationOfferFilter) ([]*crossmodel.ApplicationOfferDetails, error) }
FindAPI defines the API methods that cross model find command uses.
type ListAPI interface { Close() error ListOffers(filters ...crossmodel.ApplicationOfferFilter) ([]*crossmodel.ApplicationOfferDetails, error) }
ListAPI defines the API methods that list endpoints command use.
type ListOfferItem struct { // OfferName is the name of the offer. OfferName string `yaml:"-" json:"-"` // ApplicationName is the application backing this offer. ApplicationName string `yaml:"application" json:"application"` // Store is the controller hosting this offer. Source string `yaml:"store,omitempty" json:"store,omitempty"` // CharmURL is the charm URL of this application. CharmURL string `yaml:"charm,omitempty" json:"charm,omitempty"` // OfferURL is part of Juju location where this offer is shared relative to the store. OfferURL string `yaml:"offer-url" json:"offer-url"` // Endpoints is a list of application endpoints. Endpoints map[string]RemoteEndpoint `yaml:"endpoints" json:"endpoints"` // Connections holds details of connections to the offer. Connections []offerConnectionDetails `yaml:"connections,omitempty" json:"connections,omitempty"` // Users are the users who can consume the offer. Users map[string]OfferUser `yaml:"users,omitempty" json:"users,omitempty"` }
ListOfferItem defines the serialization behaviour of an offer item in endpoints list.
type OfferAPI interface { Close() error Offer(modelUUID, application string, endpoints []string, offerName string, desc string) ([]params.ErrorResult, error) }
OfferAPI defines the API methods that the offer command uses.
type OfferUser struct { UserName string `yaml:"-" json:"-"` DisplayName string `yaml:"display-name,omitempty" json:"display-name,omitempty"` Access string `yaml:"access" json:"access"` }
type RemoteEndpoint struct { // Name is the endpoint name. Name string `yaml:"-" json:"-"` // Interface is relation interface. Interface string `yaml:"interface" json:"interface"` // Role is relation role. Role string `yaml:"role" json:"role"` }
RemoteEndpoint defines the serialization behaviour of remote endpoints. This is used in map-style yaml output where remote endpoint name is the key.
type RemoteEndpointsCommandBase struct { modelcmd.ControllerCommandBase }
RemoteEndpointsCommandBase is a base for various cross model commands.
func (c *RemoteEndpointsCommandBase) NewRemoteEndpointsAPI(controllerName string) (*applicationoffers.Client, error)
NewRemoteEndpointsAPI returns a remote endpoints api for the root api endpoint that the command returns.
type RemoveAPI interface { Close() error DestroyOffers(force bool, offerURLs ...string) error BestAPIVersion() int }
RemoveAPI defines the API methods that the remove offer command uses.
type ShowAPI interface { Close() error ApplicationOffer(url string) (*crossmodel.ApplicationOfferDetails, error) }
ShowAPI defines the API methods that cross model show command uses.
type ShowOfferedApplication struct { // Description is the user entered description. Description string `yaml:"description,omitempty" json:"description,omitempty"` // Access is the level of access the user has on the offer. Access string `yaml:"access" json:"access"` // Endpoints list of offered application endpoints. Endpoints map[string]RemoteEndpoint `yaml:"endpoints" json:"endpoints"` // Users are the users who can access the offer. Users map[string]OfferUser `yaml:"users,omitempty" json:"users,omitempty"` }
ShowOfferedApplication defines the serialization behaviour of an application offer. This is used in map-style yaml output where remote application name is the key.
Package crossmodel imports 22 packages (graph). Updated 2020-08-06. Refresh now. Tools for package owners.