Documentation ¶
Overview ¶
The crossmodel command provides an interface that allows to manipulate and inspect cross model relations.
Index ¶
- func NewFindEndpointsCommand() cmd.Command
- func NewListEndpointsCommand() cmd.Command
- func NewOfferCommand() cmd.Command
- func NewShowOfferedEndpointCommand() cmd.Command
- type CrossModelCommandBase
- type FindAPI
- type ListAPI
- type ListOfferItem
- type OfferAPI
- type RemoteApplicationResult
- type RemoteEndpoint
- type ShowAPI
- type ShowRemoteApplication
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFindEndpointsCommand ¶
NewFindEndpointsCommand constructs command that allows to find offered application endpoints.
func NewListEndpointsCommand ¶
NewListEndpointsCommand constructs new list endpoint command.
func NewOfferCommand ¶
NewOfferCommand constructs commands that enables endpoints for export.
func NewShowOfferedEndpointCommand ¶
NewShowOfferedEndpointCommand constructs command that allows to show details of offered application's endpoint.
Types ¶
type CrossModelCommandBase ¶
type CrossModelCommandBase struct {
modelcmd.ModelCommandBase
}
CrossModelCommandBase is a base structure to get cross model managing client.
func (*CrossModelCommandBase) NewCrossModelAPI ¶
func (c *CrossModelCommandBase) NewCrossModelAPI() (*crossmodel.Client, error)
NewCrossModelAPI returns a cross model api for the root api endpoint that the environment command returns.
type FindAPI ¶
type FindAPI interface { Close() error FindApplicationOffers(filters ...crossmodel.ApplicationOfferFilter) ([]params.ApplicationOffer, error) }
FindAPI defines the API methods that cross model find command uses.
type ListAPI ¶
type ListAPI interface { Close() error ListOffers(filters ...crossmodel.ApplicationOfferFilter) ([]crossmodel.ApplicationOfferDetailsResult, error) }
ListAPI defines the API methods that list endpoints command use.
type ListOfferItem ¶
type ListOfferItem struct { // CharmName is the charm name of this application. CharmName string `yaml:"charm,omitempty" json:"charm,omitempty"` // UsersCount is the count of how many users are connected to this shared application. UsersCount int `yaml:"connected,omitempty" json:"connected,omitempty"` // Location is part of Juju location where this application is shared relative to the store. Location string `yaml:"url" json:"url"` // Endpoints is a list of application endpoints. Endpoints map[string]RemoteEndpoint `yaml:"endpoints" json:"endpoints"` }
ListOfferItem defines the serialization behaviour of an offer item in endpoints list.
type OfferAPI ¶
type OfferAPI interface { Close() error Offer(application string, endpoints []string, offerName string, desc string) ([]params.ErrorResult, error) }
OfferAPI defines the API methods that the offer command uses.
type RemoteApplicationResult ¶
type RemoteApplicationResult struct { // Endpoints is the list of offered application endpoints. Endpoints map[string]RemoteEndpoint `yaml:"endpoints" json:"endpoints"` }
RemoteApplicationResult defines the serialization behaviour of remote application. This is used in map-style yaml output where remote application URL is the key.
type RemoteEndpoint ¶
type RemoteEndpoint struct { // 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 ShowAPI ¶
type ShowAPI interface { Close() error ApplicationOffer(url string) (params.ApplicationOffer, error) }
ShowAPI defines the API methods that cross model show command uses.
type ShowRemoteApplication ¶
type ShowRemoteApplication struct { // Endpoints list of offered application endpoints. Endpoints map[string]RemoteEndpoint `yaml:"endpoints" json:"endpoints"` // Description is the user entered description. Description string `yaml:"description,omitempty" json:"description,omitempty"` }
ShowRemoteApplication defines the serialization behaviour of remote application. This is used in map-style yaml output where remote application name is the key.