cli

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commands

type Commands struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	Set          Set          `command:"set" description:"Configure the connection to an environment" alias:"add"`
	Info         Info         `command:"info" description:"Show environment information"`
	Services     Services     `command:"services" description:"Show current services available from the environment"`
	List         List         `command:"list" description:"List all locally-configured environments"`
	Rename       Rename       `command:"rename" description:"Set a new name for the environment"`
	SetOption    SetOption    `command:"set-option" description:"Set a local client option in the environment"`
	UpdateClient UpdateClient `command:"update-client" description:"Download the latest client from the environment"`
	Unset        Unset        `command:"unset" description:"Remove all configuration for an environment" alias:"remove"`
}

func CreateCommands

func CreateCommands(runtime client.Runtime, cmdRunner boshsys.CmdRunner, fs boshsys.FileSystem, s *svc.Service) *Commands

TODO convert to service factory rather than single env instance

type GetClient

type GetClient func() (svchttpclient.Client, error)

type GetDownloadClient

type GetDownloadClient func(string, bool) (downloadhttpclient.Client, error)

type Info

type Info struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	GetClient GetClient
}

func (Info) Execute

func (c Info) Execute(_ []string) error

type List

type List struct {
	*clientcmd.ServiceCommand `no-flag:"true"`
}

func (List) Execute

func (c List) Execute(_ []string) error

type Rename

type Rename struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	GetClient GetClient

	Args RenameArgs `positional-args:"true"`
}

func (Rename) Execute

func (c Rename) Execute(_ []string) error

type RenameArgs

type RenameArgs struct {
	Name string `positional-arg-name:"NEW-NAME" description:"New environment name"`
}

type Services

type Services struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	GetClient GetClient
}

func (Services) Execute

func (c Services) Execute(_ []string) error

type Set

type Set struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	GetClient GetClient

	Args              SetArgs `positional-args:"true"`
	CACertificatePath string  `long:"ca-cert" description:"Environment CA certificate path"`
	SkipVerify        bool    `long:"skip-verify" description:"Skip verification of environment availability"`

	FS boshsys.FileSystem
}

func (Set) Execute

func (c Set) Execute(_ []string) error

type SetArgs

type SetArgs struct {
	URL string `positional-arg-name:"URL" description:"Environment URL"`
}

type SetOption

type SetOption struct {
	*clientcmd.ServiceCommand `no-flag:"true"`

	Args              SetOptionArgs `positional-args:"true"`
	CACertificatePath string        `long:"ca-cert" description:"Environment CA certificate path"`
}

func (SetOption) Execute

func (c SetOption) Execute(_ []string) error

type SetOptionArgs

type SetOptionArgs struct {
	Name  string `positional-arg-name:"NAME" description:"Client option name"`
	Value string `positional-arg-name:"VALUE" description:"Client option value (parsed as YAML)"`
}

type Unset

type Unset struct {
	*clientcmd.ServiceCommand `no-flag:"true"`
}

func (Unset) Execute

func (c Unset) Execute(_ []string) error

type UpdateClient

type UpdateClient struct {
	*clientcmd.ServiceCommand `no-flag:"true"`
	clientcmd.InteractiveAuthCommand

	FS        boshsys.FileSystem
	SsocaExec string
	CmdRunner boshsys.CmdRunner

	GetClient         GetClient
	GetDownloadClient GetDownloadClient
}

func (UpdateClient) Execute

func (c UpdateClient) Execute(_ []string) error

Jump to

Keyboard shortcuts

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