cmd

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindOpts

type BindOpts struct {
}

BindOpts represents the 'bind' command

func (BindOpts) Execute

func (c BindOpts) Execute(_ []string) (err error)

Execute is callback from go-flags.Commander interface

type BindingOpts added in v0.6.4

type BindingOpts struct {
	ID string `short:"b" long:"binding" description:"Service binding ID" env:"SB_BINDING"`
}

BindingOpts ...

type BrokerOpts

type BrokerOpts struct {
	URLOpt          string `long:"url"           description:"Open Service Broker URL"                env:"SB_BROKER_URL" required:"true"`
	ClientOpt       string `long:"client"        description:"Override username or UAA client"        env:"SB_BROKER_USERNAME" required:"true"`
	ClientSecretOpt string `long:"client-secret" description:"Override password or UAA client secret" env:"SB_BROKER_PASSWORD" required:"true"`
	APIVersion      string `long:"api-version"   description:"API version request to pass to backend broker" env:"SB_BROKER_API_VERSION" default:"2.13"`
}

BrokerOpts describes subset of flags/options for selecting target service broker API

type CatalogOpts

type CatalogOpts struct {
	Strict bool `long:"strict" description:"Validate the catalog using the same heuristics as Cloud Foundry" env:"EDEN_STRICT"`
}

CatalogOpts represents the 'catalog' command

func (CatalogOpts) Execute

func (c CatalogOpts) Execute(_ []string) (err error)

Execute is callback from go-flags.Commander interface

type CredentialsOpts

type CredentialsOpts struct {
	BindingID string `short:"b" long:"bind" description:"Binding to display"`
	Attribute string `short:"a" long:"attribute" description:"Only diplay a single attribute from credentials"`
}

CredentialsOpts represents the 'credentials' command

func (CredentialsOpts) Execute

func (c CredentialsOpts) Execute(_ []string) (err error)

Execute is callback from go-flags.Commander interface

type DeprovisionOpts

type DeprovisionOpts struct {
}

DeprovisionOpts represents the 'deprovision' command

func (DeprovisionOpts) Execute

func (c DeprovisionOpts) Execute(_ []string) (err error)

Execute is callback from go-flags.Commander interface

type EdenOpts

type EdenOpts struct {
	Version bool `short:"v" long:"version" description:"Show version"`

	// Slice of bool will append 'true' each time the option
	// is encountered (can be set multiple times, like -vvv)
	Verbose []bool `long:"verbose" description:"Show verbose debug information" env:"EDEN_TRACE"`
	JSON    bool   `long:"json" description:"Print information in JSON format, for easier parsing" env:"EDEN_AS_JSON"`

	ConfigPathOpt string `long:"config" description:"Config file path" env:"EDEN_CONFIG" default:"~/.eden/config"`

	Instance InstanceOpts `group:"Service Instance Options"`
	Binding  BindingOpts  `group:"Service Binding Options"`
	Broker   BrokerOpts   `group:"Broker Options"`

	// Broker API commands
	Catalog     CatalogOpts     `command:"catalog" alias:"cat" alias:"inventory" alias:"inv" description:"Show available service catalog"`
	Provision   ProvisionOpts   `command:"provision" alias:"p" description:"Create new service instance"`
	Bind        BindOpts        `command:"bind" alias:"b" description:"Generate credentials for service instance"`
	Unbind      UnbindOpts      `command:"unbind" alias:"u" description:"Remove credentials for service instance"`
	Deprovision DeprovisionOpts `command:"deprovision" alias:"d" description:"Destroy service instance"`

	// Local data commands
	Services    ServicesOpts    `command:"services" alias:"s" description:"List service instances (stored in config file)"`
	Credentials CredentialsOpts `command:"credentials" alias:"creds" alias:"c" description:"Display binding credentials (stored in config file)"`
	Rename      RenameOpts      `command:"rename" description:"Rename service instance (stored in config file)"`
}

EdenOpts describes the flags/options for the CLI

var Opts EdenOpts

Opts carries all the user provided options (from flags or env vars)

type InstanceOpts

type InstanceOpts struct {
	NameOrID string `short:"i" long:"instance" description:"Service instance name/ID" env:"SB_INSTANCE"`
}

InstanceOpts describes a target service instance

type ProvisionOpts

type ProvisionOpts struct {
	ServiceNameOrID string `short:"s" long:"service-name" description:"Service name/ID from catalog" required:"true"`
	PlanNameOrID    string `short:"p" long:"plan-name" description:"Plan name/ID from catalog (default: first)"`
	Parameters      string `short:"P" long:"parameters" description:"parameters in json format"`
}

ProvisionOpts represents the 'provision' command

func (ProvisionOpts) Execute

func (c ProvisionOpts) Execute(_ []string) (err error)

Execute is callback from go-flags.Commander interface

type RenameOpts

type RenameOpts struct {
}

RenameOpts represents the 'rename' command

func (RenameOpts) Execute

func (c RenameOpts) Execute(args []string) (err error)

Execute is callback from go-flags.Commander interface

type ServicesOpts

type ServicesOpts struct {
}

ServicesOpts represents the 'services' command

func (ServicesOpts) Execute

func (c ServicesOpts) Execute(_ []string) (err error)

Execute is callback from go-flags.Commander interface

type UnbindOpts

type UnbindOpts struct {
}

UnbindOpts represents the 'unbind' command

func (UnbindOpts) Execute

func (c UnbindOpts) Execute(_ []string) (err error)

Execute is callback from go-flags.Commander interface

Jump to

Keyboard shortcuts

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