cmd

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContextCommand

func NewContextCommand() *cobra.Command

func NewExecCommand added in v0.2.0

func NewExecCommand() *cobra.Command

func NewKubectlCommand

func NewKubectlCommand() *cobra.Command

func NewNamespaceCommand

func NewNamespaceCommand() *cobra.Command

func NewVersionCommand added in v0.4.0

func NewVersionCommand() *cobra.Command

Types

type ContextOptions added in v0.6.0

type ContextOptions struct {
	Out    io.Writer
	ErrOut io.Writer

	Args []string

	Config         config.Config
	ContextLoader  func() ([]kubeconfig.Context, error)
	StateManager   func() (*state.Manager, error)
	Selector       func([]string) (string, error)
	IsInteractive  func() bool
	ShellLauncher  func(kubeconfigPath, originalPath, contextName string, cfg config.Config) error
	TempFileWriter func(kubeconfigPath, contextName, namespace string) (*os.File, func(), error)
}

func NewContextOptions added in v0.6.0

func NewContextOptions() *ContextOptions

func (*ContextOptions) Complete added in v0.6.0

func (o *ContextOptions) Complete(cmd *cobra.Command, args []string) error

func (*ContextOptions) Run added in v0.6.0

func (o *ContextOptions) Run() error

func (*ContextOptions) Validate added in v0.6.0

func (o *ContextOptions) Validate() error

type ExecOptions added in v0.6.0

type ExecOptions struct {
	Out    io.Writer
	ErrOut io.Writer

	Namespace string
	Regex     bool
	Parallel  bool
	DryRun    bool
	Output    string

	Patterns    []string
	CommandArgs []string

	Config        config.Config
	ContextLoader func() ([]kubeconfig.Context, error)
	StateManager  func() (*state.Manager, error)
	IsInteractive func() bool
	Selector      func([]string) ([]string, error)
}

func NewExecOptions added in v0.6.0

func NewExecOptions() *ExecOptions

func (*ExecOptions) Complete added in v0.6.0

func (o *ExecOptions) Complete(cmd *cobra.Command, args []string) error

func (*ExecOptions) Run added in v0.6.0

func (o *ExecOptions) Run() error

func (*ExecOptions) Validate added in v0.6.0

func (o *ExecOptions) Validate() error

type KubectlOptions added in v0.6.0

type KubectlOptions struct {
	Out    io.Writer
	ErrOut io.Writer

	Args []string

	Config             config.Config
	StateManager       func() (*state.Manager, error)
	ClientConfigLoader func() (*api.Config, error)
	CommandRunner      func([]string) error
	Prompter           func() bool
}

func NewKubectlOptions added in v0.6.0

func NewKubectlOptions() *KubectlOptions

func (*KubectlOptions) Complete added in v0.6.0

func (o *KubectlOptions) Complete(cmd *cobra.Command, args []string) error

func (*KubectlOptions) Run added in v0.6.0

func (o *KubectlOptions) Run() error

func (*KubectlOptions) Validate added in v0.6.0

func (o *KubectlOptions) Validate() error

type NamespaceOptions added in v0.6.0

type NamespaceOptions struct {
	Out    io.Writer
	ErrOut io.Writer

	Args []string

	Config            config.Config
	StateManager      func() (*state.Manager, error)
	NamespaceLister   func(ctx context.Context) ([]string, error)
	Selector          func([]string) (string, error)
	IsInteractive     func() bool
	NamespaceSwitcher func(sm *state.Manager, namespace string, namespaces []string) error
}

func NewNamespaceOptions added in v0.6.0

func NewNamespaceOptions() *NamespaceOptions

func (*NamespaceOptions) Complete added in v0.6.0

func (o *NamespaceOptions) Complete(cmd *cobra.Command, args []string) error

func (*NamespaceOptions) Run added in v0.6.0

func (o *NamespaceOptions) Run() error

func (*NamespaceOptions) Validate added in v0.6.0

func (o *NamespaceOptions) Validate() error

type RootCmd

type RootCmd struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewRootCmd

func NewRootCmd() *RootCmd

func (*RootCmd) Execute

func (c *RootCmd) Execute()

type ShellOptions added in v0.6.0

type ShellOptions struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

func DefaultShellOptions added in v0.6.0

func DefaultShellOptions() ShellOptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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