cli

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandGroup

type CommandGroup interface {
	Command(name, help string) *kingpin.CmdClause
}

Implemented by kingpin.CommandLine (an instance of kingpin.Application).

type CommandRegistry

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

func NewCommandRegistry

func NewCommandRegistry() *CommandRegistry

func (*CommandRegistry) Add

func (r *CommandRegistry) Add(cmd *kingpin.CmdClause, h Handler)

func (*CommandRegistry) Lookup

func (r *CommandRegistry) Lookup(name string) Handler

type Context

type Context interface {
	Logger() *zap.Logger
	Client() (*plclient.Client, error)
}

func NewContext

func NewContext(logger *zap.Logger, g kpflag.FlagGroup) Context

func NewContextForTest

func NewContextForTest(t *testing.T) Context

type Handler

type Handler interface {
	Setup(*kingpin.CmdClause)
	Run(context.Context, Context) error
}

Jump to

Keyboard shortcuts

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