cmd

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PollIntervalinSeconds = 2
)

PollIntervalinSeconds ..

Variables

View Source
var DefaultConfigPath string
View Source
var Version = "DEV"

Functions

func BindAllFlags

func BindAllFlags(cmd *cobra.Command)

BindAllFlags ...

func MarkFlagsRequired

func MarkFlagsRequired(cmd *cobra.Command, names ...string)

MarkFlagsRequired ...

func NewRootCommand

func NewRootCommand(cli *CLI) *cobra.Command

NewRootCommand ...

Types

type CLI

type CLI struct {
	Endpoint    string
	Context     context.Context
	RootCommand *cobra.Command

	Plugin bool
	// contains filtered or unexported fields
}

CLI ...

func NewCLI

func NewCLI(plugin bool) *CLI

NewCLI ...

func (*CLI) Client

func (c *CLI) Client() *nutanix.Client

Client cli ...

func (*CLI) WaitTask

func (c *CLI) WaitTask(ctx context.Context, taskUUID string, timeoutSeconds int) error

WaitTask ...

type Config added in v0.0.20

type Config struct {
	Insecure      bool       `mapstructure:"insecure"`
	Contexts      []*Context `mapstructure:"contexts"`
	ActiveContext string     `mapstructure:"active_context"`
}

func (*Config) ContextByName added in v0.0.20

func (o *Config) ContextByName(name string) *Context

func (Config) JSON added in v0.0.20

func (o Config) JSON(w io.Writer) error

func (Config) JSONPath added in v0.0.20

func (o Config) JSONPath(w io.Writer, template string) error

func (Config) PP added in v0.0.20

func (o Config) PP(w io.Writer) error

func (*Config) RemoveContext added in v0.0.20

func (o *Config) RemoveContext(context *Context)

func (Config) TableData added in v0.0.20

func (o Config) TableData(w io.Writer) error

func (Config) Text added in v0.0.20

func (o Config) Text(w io.Writer) error

func (Config) YAML added in v0.0.20

func (o Config) YAML(w io.Writer) error

type Context added in v0.0.20

type Context struct {
	Name     string `mapstructure:"name"`
	Endpoint string `mapstructure:"endpoint"`
	Password string `mapstructure:"password"`
	User     string `mapstructure:"user"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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