cmdcore

package
v0.8.22 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(rootCmd *cobra.Command, cmdFuncs map[string]CommandEntry)

Types

type CommandContext

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

func NewCommandContext

func NewCommandContext(clientSet *admin.Clientset, out io.Writer) CommandContext

func NewCommandContextNoClient added in v0.6.11

func NewCommandContextNoClient(out io.Writer) CommandContext

NewCommandContextNoClient returns a new commandContext

func NewCommandContextWithExt added in v0.1.7

func NewCommandContextWithExt(
	clientSet *admin.Clientset,
	fetcher ext.AdminFetcherExtInterface,
	updater ext.AdminUpdaterExtInterface,
	deleter ext.AdminDeleterExtInterface,
	out io.Writer) CommandContext

NewCommandContextWithExt construct command context with injected extensions. Helps in injecting mocked ones for testing.

func (CommandContext) AdminClient

func (c CommandContext) AdminClient() service.AdminServiceClient

func (CommandContext) AdminDeleterExt added in v0.1.7

func (c CommandContext) AdminDeleterExt() ext.AdminDeleterExtInterface

func (CommandContext) AdminFetcherExt added in v0.1.7

func (c CommandContext) AdminFetcherExt() ext.AdminFetcherExtInterface

func (CommandContext) AdminUpdaterExt added in v0.1.7

func (c CommandContext) AdminUpdaterExt() ext.AdminUpdaterExtInterface

func (CommandContext) ClientSet added in v0.5.9

func (c CommandContext) ClientSet() *admin.Clientset

func (CommandContext) InputPipe

func (c CommandContext) InputPipe() io.Reader

func (CommandContext) OutputPipe

func (c CommandContext) OutputPipe() io.Writer

type CommandEntry

type CommandEntry struct {
	ProjectDomainNotRequired bool
	CmdFunc                  CommandFunc
	Aliases                  []string
	Short                    string
	Long                     string
	PFlagProvider            PFlagProvider
	DisableFlyteClient       bool
}

type CommandFunc

type CommandFunc func(ctx context.Context, args []string, cmdCtx CommandContext) error

type PFlagProvider

type PFlagProvider interface {
	GetPFlagSet(prefix string) *pflag.FlagSet
}

Jump to

Keyboard shortcuts

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