commands

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 69 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// LoggerTypeDefault is the logger default type.
	LoggerTypeDefault = "default"
	// LoggerTypeJSON is the logger json type.
	LoggerTypeJSON = "json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Name() string
	Run(ctx context.Context, config RootConfig) error
}

Command represents an application command, all commands that want to be executed should implement and setup on main.

func NewGenerateCommand

func NewGenerateCommand(app *kingpin.Application) Command

NewGenerateCommand returns the generate command.

func NewKubeControllerCommand added in v0.2.0

func NewKubeControllerCommand(app *kingpin.Application) Command

NewKubeControllerCommand returns the Kubernetes controller command.

func NewServerCommand added in v0.16.0

func NewServerCommand(app *kingpin.Application) Command

NewServerCommand returns the UI command.

func NewValidateCommand added in v0.4.0

func NewValidateCommand(app *kingpin.Application) Command

NewValidateCommand returns the validate command.

func NewVersionCommand added in v0.2.0

func NewVersionCommand(app *kingpin.Application) Command

NewVersionCommand returns the version command.

type RootConfig

type RootConfig struct {
	// Global flags.
	Debug      bool
	NoLog      bool
	NoColor    bool
	LoggerType string

	// Global instances.
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
	Logger log.Logger
}

RootConfig represents the root command configuration and global configuration for all the commands.

func NewRootConfig

func NewRootConfig(app *kingpin.Application) *RootConfig

NewRootConfig initializes the main root configuration.

Jump to

Keyboard shortcuts

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