Documentation ¶
Index ¶
- func CompleteDryRun(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func CompleteKeyValue(keys []string, completed string) ([]string, cobra.ShellCompDirective)
- func CompleteLogLevel(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- type DryRun
- type KeyValue
- type KeyValueArray
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteDryRun ¶
CompleteDryRun returns completions for the DryRun type.
func CompleteKeyValue ¶
func CompleteKeyValue(keys []string, completed string) ([]string, cobra.ShellCompDirective)
CompleteKeyValue returns key=value completions using the given slice of keys.
func CompleteLogLevel ¶
CompleteLogLevel returns completions for the LogLevel type.
Types ¶
type DryRun ¶
type DryRun string
DryRun is an enum flag for setting dry-run.
const ( // DryRunNone disables dry-run. The build will be performed as usual. DryRunNone DryRun = "none" // DryRunClient only logs what would be run, without contacting Kubernetes. DryRunClient DryRun = "client" // DryRunServer submits server-side dry-run requests to Kubernetes. DryRunServer DryRun = "server" )
func (*DryRun) Set ¶
Set implements the pflag.Value interface. This parses the dry-run string and updates the dry-run variable.
type KeyValue ¶
KeyValue is a flag that takes in a key=value format.
type KeyValueArray ¶
type KeyValueArray struct { Pairs []KeyValue // contains filtered or unexported fields }
KeyValueArray is a flag type that takes in key=value on each flag value and can be specified multiple times.
func (*KeyValueArray) Append ¶
func (s *KeyValueArray) Append(val string) error
Append parses a "key=value" string and adds that to this array.
func (*KeyValueArray) GetSlice ¶
func (s *KeyValueArray) GetSlice() []string
GetSlice returns a slice of "key=value" string representations for all the values.
func (*KeyValueArray) Replace ¶
func (s *KeyValueArray) Replace(val []string) error
Replace parses a slice of "key=value" strings and sets those as this flag's new values.
func (*KeyValueArray) Set ¶
func (s *KeyValueArray) Set(val string) error
Set parses a "key=value" string and updates this flag with that value, overriding the array if it's the first time its set, or appends the value if it's a consecutive call.
func (*KeyValueArray) String ¶
func (s *KeyValueArray) String() string
String returns a "[key1=value,key2=value]" string represetntation for this flag.
func (*KeyValueArray) Type ¶
func (s *KeyValueArray) Type() string
Type returns the name of this type.
type LogLevel ¶
LogLevel is a pflag.Value-compatible logging level flag for wharf-core's logger.Level type.
func (*LogLevel) Set ¶
Set implements the pflag.Value interface. This parses the loglevel string and updates the loglevel variable.