crossmodel

package
v0.0.0-...-a0d7459 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

The crossmodel command provides an interface that allows to manipulate and inspect cross model relations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFindEndpointsCommand

func NewFindEndpointsCommand() cmd.Command

NewFindEndpointsCommand constructs command that allows to find offered application endpoints.

func NewListEndpointsCommand

func NewListEndpointsCommand() cmd.Command

NewListEndpointsCommand constructs new list endpoint command.

func NewOfferCommand

func NewOfferCommand() cmd.Command

NewOfferCommand constructs commands that enables endpoints for export.

func NewShowOfferedEndpointCommand

func NewShowOfferedEndpointCommand() cmd.Command

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.

Jump to

Keyboard shortcuts

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