Help us shape the future of Go! Take the 2026 Go Developer Survey

command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KVStoreConsul     = "consul"
	KVStoreZookeeper  = "zookeeper"
	KVStoreEtcd       = "etcd"
	KVStoreConfigMaps = "configmaps"
)

Variables

View Source
var DefaultUI = &cli.ConcurrentUi{
	Ui: &cli.ColoredUi{
		Ui: &cli.BasicUi{
			Writer:      os.Stdout,
			Reader:      os.Stdin,
			ErrorWriter: os.Stderr,
		},
		WarnColor:  cli.UiColorYellow,
		InfoColor:  cli.UiColorGreen,
		ErrorColor: cli.UiColorRed,
	},
}

Functions

func AddKVStoreFlags

func AddKVStoreFlags(fs *flag.FlagSet, kv *KVStoreConfig)

AddKVStoreFlags adds to an existing flagset the command lines flags to configure the key-value store connection

func RunCommand

func RunCommand(commandName string, command cli.CommandFactory)

RunCommand runs a single command

func RunSubcommands

func RunSubcommands(commandName string, subcommands map[string]cli.CommandFactory)

RunSubcommands a command given its subcommands

Types

type KVStoreConfig

type KVStoreConfig struct {
	Address   string
	Store     string
	Prefix    string
	Namespace string
}

KVStoreConfig holds the key-value store configuration set from the command line

type PrefixedUi

type PrefixedUi struct {
	Ui     cli.Ui
	Prefix string
}

func NewPrefixedUi

func NewPrefixedUi(prefix string) *PrefixedUi

func (*PrefixedUi) Ask

func (p *PrefixedUi) Ask(query string) (string, error)

func (*PrefixedUi) AskSecret

func (p *PrefixedUi) AskSecret(query string) (string, error)

func (*PrefixedUi) Error

func (p *PrefixedUi) Error(s string)

func (*PrefixedUi) Info

func (p *PrefixedUi) Info(s string)

func (*PrefixedUi) Output

func (p *PrefixedUi) Output(s string)

func (*PrefixedUi) Warn

func (p *PrefixedUi) Warn(s string)

Jump to

Keyboard shortcuts

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