juju: github.com/juju/juju/cmd/juju/crossmodel Index | Files

package crossmodel

import "github.com/juju/juju/cmd/juju/crossmodel"

Index

Package Files

find.go findformatter.go list.go listformatter.go offer.go remoteendpoints.go remove.go show.go showformatter.go

func NewFindEndpointsCommand Uses

func NewFindEndpointsCommand() cmd.Command

NewFindEndpointsCommand constructs command that allows to find offered application endpoints.

func NewListEndpointsCommand Uses

func NewListEndpointsCommand() cmd.Command

NewListEndpointsCommand constructs new list endpoint command.

func NewOfferCommand Uses

func NewOfferCommand() cmd.Command

NewOfferCommand constructs commands that enables endpoints for export.

func NewRemoveOfferCommand Uses

func NewRemoveOfferCommand() cmd.Command

NewRemoveOfferCommand returns a command used to remove a specified offer.

func NewShowOfferedEndpointCommand Uses

func NewShowOfferedEndpointCommand() cmd.Command

NewShowOfferedEndpointCommand constructs command that allows to show details of offered application's endpoint.

func RelationStatusColor Uses

func RelationStatusColor(status relation.Status) *ansiterm.Context

RelationStatusColor returns a context used to print the status with the relevant color.

type ApplicationOfferResult Uses

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 Uses

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 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 Uses

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 Uses

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 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 Uses

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 Uses

type RemoteEndpointsCommandBase struct {
    modelcmd.ControllerCommandBase
}

RemoteEndpointsCommandBase is a base for various cross model commands.

func (*RemoteEndpointsCommandBase) NewRemoteEndpointsAPI Uses

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 Uses

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 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 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) and is imported by 9 packages. Updated 2019-08-27. Refresh now. Tools for package owners.