command

package
v0.0.0-...-4124784 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands(metaPtr *Meta) map[string]cli.CommandFactory

Types

type DescribeCommand

type DescribeCommand struct {
	Meta
}

func (*DescribeCommand) Help

func (c *DescribeCommand) Help() string

func (*DescribeCommand) Name

func (f *DescribeCommand) Name() string

func (*DescribeCommand) Run

func (c *DescribeCommand) Run(args []string) int

func (*DescribeCommand) Synopsis

func (f *DescribeCommand) Synopsis() string

type DiscoverCommand

type DiscoverCommand struct {
	Meta
}

func (*DiscoverCommand) Help

func (c *DiscoverCommand) Help() string

func (*DiscoverCommand) Name

func (f *DiscoverCommand) Name() string

func (*DiscoverCommand) Run

func (c *DiscoverCommand) Run(args []string) int

func (*DiscoverCommand) Synopsis

func (f *DiscoverCommand) Synopsis() string

type FlagSetFlags

type FlagSetFlags uint

FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet.

const (
	FlagSetNone    FlagSetFlags = 0
	FlagSetClient  FlagSetFlags = 1 << iota
	FlagSetDefault              = FlagSetClient
)

type Meta

type Meta struct {
	UI cli.Ui
	// contains filtered or unexported fields
}

Meta contains the meta-options and functionality that nearly every command inherits.

func (*Meta) AutocompleteFlags

func (m *Meta) AutocompleteFlags(fs FlagSetFlags) complete.Flags

AutocompleteFlags returns a set of flag completions for the given flag set.

func (*Meta) Colorize

func (m *Meta) Colorize() *colorstring.Colorize

func (*Meta) FlagSet

func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet

FlagSet returns a FlagSet with the common flags that every command implements. The exact behavior of FlagSet can be configured using the flags as the second parameter, for example to disable server settings on the commands that don't talk to a server.

type NamedCommand

type NamedCommand interface {
	Name() string
}

type SwitchCommand

type SwitchCommand struct {
	Meta
}

func (*SwitchCommand) Help

func (c *SwitchCommand) Help() string

func (*SwitchCommand) Name

func (f *SwitchCommand) Name() string

func (*SwitchCommand) Run

func (c *SwitchCommand) Run(args []string) int

func (*SwitchCommand) Synopsis

func (f *SwitchCommand) Synopsis() string

Jump to

Keyboard shortcuts

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