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 ¶
func NewKubeControllerCommand(app *kingpin.Application) Command
NewKubeControllerCommand returns the Kubernetes controller command.
func NewValidateCommand ¶
func NewValidateCommand(app *kingpin.Application) Command
NewValidateCommand returns the validate command.
func NewVersionCommand ¶
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.
Click to show internal directories.
Click to hide internal directories.