flags

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package flags holds common flags that are shared between our commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge added in v0.17.0

func Merge(dst, src *flag.FlagSet)

func ToSet added in v0.19.0

func ToSet(s []string) mapset.Set

ToSet creates a set from s.

func Usage added in v0.17.0

func Usage(txt string, flags *flag.FlagSet) string

Usage returns a usage string nicely formatted.

Types

type AppendSliceValue added in v0.17.0

type AppendSliceValue []string

AppendSliceValue implements the flag.Value interface and allows multiple calls to the same variable to append a list.

func (*AppendSliceValue) Set added in v0.17.0

func (s *AppendSliceValue) Set(value string) error

func (*AppendSliceValue) String added in v0.17.0

func (s *AppendSliceValue) String() string

type FlagMapValue added in v0.26.0

type FlagMapValue map[string]string

FlagMapValue is a flag implementation used to provide key=value semantics multiple times.

func (*FlagMapValue) Set added in v0.26.0

func (h *FlagMapValue) Set(value string) error

func (*FlagMapValue) String added in v0.26.0

func (h *FlagMapValue) String() string

type HTTPFlags added in v0.17.0

type HTTPFlags struct {
	// contains filtered or unexported fields
}

HTTPFlags are flags used to configure communication with a Consul agent.

func (*HTTPFlags) APIClient added in v0.17.0

func (f *HTTPFlags) APIClient() (*api.Client, error)

func (*HTTPFlags) Addr added in v0.17.0

func (f *HTTPFlags) Addr() string

func (*HTTPFlags) Flags added in v0.17.0

func (f *HTTPFlags) Flags() *flag.FlagSet

func (*HTTPFlags) MergeOntoConfig added in v0.17.0

func (f *HTTPFlags) MergeOntoConfig(c *api.Config)

func (*HTTPFlags) ReadTokenFile added in v0.17.0

func (f *HTTPFlags) ReadTokenFile() (string, error)

func (*HTTPFlags) SetToken added in v0.17.0

func (f *HTTPFlags) SetToken(v string) error

func (*HTTPFlags) SetTokenFile added in v0.17.0

func (f *HTTPFlags) SetTokenFile(v string) error

func (*HTTPFlags) Token added in v0.17.0

func (f *HTTPFlags) Token() string

func (*HTTPFlags) TokenFile added in v0.17.0

func (f *HTTPFlags) TokenFile() string

type K8SFlags

type K8SFlags struct {
	// contains filtered or unexported fields
}

func (*K8SFlags) Flags

func (f *K8SFlags) Flags() *flag.FlagSet

func (*K8SFlags) KubeConfig

func (f *K8SFlags) KubeConfig() string

type StringValue added in v0.17.0

type StringValue struct {
	// contains filtered or unexported fields
}

StringValue provides a flag value that's aware if it has been set.

func (*StringValue) Merge added in v0.17.0

func (s *StringValue) Merge(onto *string)

Merge will overlay this value if it has been set.

func (*StringValue) Set added in v0.17.0

func (s *StringValue) Set(v string) error

Set implements the flag.Value interface.

func (*StringValue) String added in v0.17.0

func (s *StringValue) String() string

String implements the flag.Value interface.

type Usager added in v0.17.0

type Usager struct {
	Usage string
	Flags *flag.FlagSet
}

func (*Usager) String added in v0.17.0

func (u *Usager) String() string

Jump to

Keyboard shortcuts

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