cmd

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldAddSuggest

func ShouldAddSuggest(command, suggest string) (string, bool)

ShouldAddSuggest checks if a suggestion match the given command.

func SuggestSubCommand

func SuggestSubCommand(command string, namespaces client.NamespaceNames, contexts []string) []string

SuggestSubCommand suggests namespaces or contexts based on current command.

func ToLabels added in v0.30.1

func ToLabels(s string) map[string]string

Types

type Interpreter

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

func NewInterpreter

func NewInterpreter(s string) *Interpreter

func (*Interpreter) Amend

func (c *Interpreter) Amend(c1 *Interpreter)

func (*Interpreter) Cmd

func (c *Interpreter) Cmd() string

func (*Interpreter) ContextArg

func (c *Interpreter) ContextArg() (string, bool)

func (*Interpreter) CowArg

func (c *Interpreter) CowArg() (string, bool)

func (*Interpreter) DirArg

func (c *Interpreter) DirArg() (string, bool)

func (*Interpreter) FilterArg

func (c *Interpreter) FilterArg() (string, bool)

func (*Interpreter) GetLine

func (c *Interpreter) GetLine() string

func (*Interpreter) HasContext

func (c *Interpreter) HasContext() (string, bool)

func (*Interpreter) HasNS

func (c *Interpreter) HasNS() bool

func (*Interpreter) IsAliasCmd

func (c *Interpreter) IsAliasCmd() bool

func (*Interpreter) IsBailCmd

func (c *Interpreter) IsBailCmd() bool

func (*Interpreter) IsBlank

func (c *Interpreter) IsBlank() bool

func (*Interpreter) IsContextCmd

func (c *Interpreter) IsContextCmd() bool

func (*Interpreter) IsCowCmd

func (c *Interpreter) IsCowCmd() bool

func (*Interpreter) IsDirCmd

func (c *Interpreter) IsDirCmd() bool

func (*Interpreter) IsHelpCmd

func (c *Interpreter) IsHelpCmd() bool

func (*Interpreter) IsRBACCmd

func (c *Interpreter) IsRBACCmd() bool

func (*Interpreter) IsXrayCmd

func (c *Interpreter) IsXrayCmd() bool

func (*Interpreter) LabelsArg

func (c *Interpreter) LabelsArg() (map[string]string, bool)

func (*Interpreter) NSArg

func (c *Interpreter) NSArg() (string, bool)

func (*Interpreter) RBACArgs

func (c *Interpreter) RBACArgs() (string, string, bool)

func (*Interpreter) Reset

func (c *Interpreter) Reset(s string) *Interpreter

func (*Interpreter) ResetContextArg

func (c *Interpreter) ResetContextArg()

func (*Interpreter) XrayArgs

func (c *Interpreter) XrayArgs() (string, string, bool)

Jump to

Keyboard shortcuts

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