cli

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func NewApp

func NewApp(name, desc, version, build string) *App

func (*App) Command

func (a *App) Command(name string, desc string) *kingpin.CmdClause

func (*App) RegisterCommand

func (a *App) RegisterCommand(cmd Command)

func (*App) Run

func (a *App) Run() error

type Command

type Command interface {
	FullCommand() string
	Run(ctx context.Context, metrics metrics.Metrics, logger *zap.Logger) error
}

type CommandRegistry

type CommandRegistry interface {
	RegisterCommand(Command)
}

type ParentCommand

type ParentCommand interface {
	Command(name string, desc string) *kingpin.CmdClause
}

Jump to

Keyboard shortcuts

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