command

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvHumioCLINoColor is an env var that toggles colored UI output.
	EnvHumioCLINoColor = `HUMIO_CLI_NO_COLOR`
)

Variables

This section is empty.

Functions

func Commands

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

func Map

func Map(vs []string, f func(string) testCase) []testCase

Types

type ApiClientFactory

type ApiClientFactory func() (*api.Client, error)

ApiClientFactory is the signature of a API client factory

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 IngestTokenCommand

type IngestTokenCommand struct {
	Meta
}

func (*IngestTokenCommand) Help

func (f *IngestTokenCommand) Help() string

func (*IngestTokenCommand) Name

func (f *IngestTokenCommand) Name() string

func (*IngestTokenCommand) Run

func (f *IngestTokenCommand) Run(args []string) int

func (*IngestTokenCommand) Synopsis

func (f *IngestTokenCommand) Synopsis() string

type LoginCommand

type LoginCommand struct {
	Meta
}

func (*LoginCommand) Help

func (f *LoginCommand) Help() string

func (*LoginCommand) Name

func (f *LoginCommand) Name() string

func (*LoginCommand) Run

func (f *LoginCommand) Run(args []string) int

func (*LoginCommand) Synopsis

func (f *LoginCommand) Synopsis() string

type Meta

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

Meta contains the meta-options and functionality that nearly every Nomad 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) Client

func (m *Meta) Client() (*api.Client, error)

Client is used to initialize and return a new API client using the default command line arguments and env vars.

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
}

NamedCommand is a interface to denote a commmand's name.

type ParsersCommand

type ParsersCommand struct {
	Meta
}

func (*ParsersCommand) Help

func (f *ParsersCommand) Help() string

func (*ParsersCommand) Name

func (f *ParsersCommand) Name() string

func (*ParsersCommand) Run

func (f *ParsersCommand) Run(args []string) int

func (*ParsersCommand) Synopsis

func (f *ParsersCommand) Synopsis() string

type ParsersExportCommand

type ParsersExportCommand struct {
	Meta
}

func (*ParsersExportCommand) Help

func (f *ParsersExportCommand) Help() string

func (*ParsersExportCommand) Name

func (f *ParsersExportCommand) Name() string

func (*ParsersExportCommand) Run

func (f *ParsersExportCommand) Run(args []string) int

func (*ParsersExportCommand) Synopsis

func (f *ParsersExportCommand) Synopsis() string

type ParsersInstallCommand

type ParsersInstallCommand struct {
	Meta
}

func (*ParsersInstallCommand) Help

func (f *ParsersInstallCommand) Help() string

func (*ParsersInstallCommand) Name

func (f *ParsersInstallCommand) Name() string

func (*ParsersInstallCommand) Run

func (f *ParsersInstallCommand) Run(args []string) int

func (*ParsersInstallCommand) Synopsis

func (f *ParsersInstallCommand) Synopsis() string

type ParsersListCommand

type ParsersListCommand struct {
	Meta
}

func (*ParsersListCommand) Help

func (f *ParsersListCommand) Help() string

func (*ParsersListCommand) Name

func (f *ParsersListCommand) Name() string

func (*ParsersListCommand) Run

func (f *ParsersListCommand) Run(args []string) int

func (*ParsersListCommand) Synopsis

func (f *ParsersListCommand) Synopsis() string

type ParsersRemoveCommand

type ParsersRemoveCommand struct {
	Meta
}

func (*ParsersRemoveCommand) Help

func (f *ParsersRemoveCommand) Help() string

func (*ParsersRemoveCommand) Name

func (f *ParsersRemoveCommand) Name() string

func (*ParsersRemoveCommand) Run

func (f *ParsersRemoveCommand) Run(args []string) int

func (*ParsersRemoveCommand) Synopsis

func (f *ParsersRemoveCommand) Synopsis() string

type TokensAddCommand

type TokensAddCommand struct {
	Meta
}

func (*TokensAddCommand) Help

func (f *TokensAddCommand) Help() string

func (*TokensAddCommand) Name

func (f *TokensAddCommand) Name() string

func (*TokensAddCommand) Run

func (f *TokensAddCommand) Run(args []string) int

func (*TokensAddCommand) Synopsis

func (f *TokensAddCommand) Synopsis() string

type TokensListCommand

type TokensListCommand struct {
	Meta
}

func (*TokensListCommand) Help

func (f *TokensListCommand) Help() string

func (*TokensListCommand) Name

func (f *TokensListCommand) Name() string

func (*TokensListCommand) Run

func (f *TokensListCommand) Run(args []string) int

func (*TokensListCommand) Synopsis

func (f *TokensListCommand) Synopsis() string

type TokensRemoveCommand

type TokensRemoveCommand struct {
	Meta
}

func (*TokensRemoveCommand) Help

func (f *TokensRemoveCommand) Help() string

func (*TokensRemoveCommand) Name

func (f *TokensRemoveCommand) Name() string

func (*TokensRemoveCommand) Run

func (f *TokensRemoveCommand) Run(args []string) int

func (*TokensRemoveCommand) Synopsis

func (f *TokensRemoveCommand) Synopsis() string

type UsersCommand

type UsersCommand struct {
	Meta
}

func (*UsersCommand) Help

func (f *UsersCommand) Help() string

func (*UsersCommand) Name

func (f *UsersCommand) Name() string

func (*UsersCommand) Run

func (f *UsersCommand) Run(args []string) int

func (*UsersCommand) Synopsis

func (f *UsersCommand) Synopsis() string

type UsersListCommand

type UsersListCommand struct {
	Meta
}

func (*UsersListCommand) Help

func (f *UsersListCommand) Help() string

func (*UsersListCommand) Name

func (f *UsersListCommand) Name() string

func (*UsersListCommand) Run

func (f *UsersListCommand) Run(args []string) int

func (*UsersListCommand) Synopsis

func (f *UsersListCommand) Synopsis() string

type UsersShowCommand

type UsersShowCommand struct {
	Meta
}

func (*UsersShowCommand) Help

func (f *UsersShowCommand) Help() string

func (*UsersShowCommand) Name

func (f *UsersShowCommand) Name() string

func (*UsersShowCommand) Run

func (f *UsersShowCommand) Run(args []string) int

func (*UsersShowCommand) Synopsis

func (f *UsersShowCommand) Synopsis() string

type UsersUpdateCommand

type UsersUpdateCommand struct {
	Meta
}

func (*UsersUpdateCommand) Help

func (f *UsersUpdateCommand) Help() string

func (*UsersUpdateCommand) Name

func (f *UsersUpdateCommand) Name() string

func (*UsersUpdateCommand) Run

func (f *UsersUpdateCommand) Run(args []string) int

func (*UsersUpdateCommand) Synopsis

func (f *UsersUpdateCommand) Synopsis() string

Jump to

Keyboard shortcuts

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