Documentation ¶
Overview ¶
Package cli implements the command line interface.
Index ¶
Constants ¶
View Source
const ( // OutputTerminal is the text output. OutputTerminal = "TERMINAL" // OutputJSON is the json output. OutputJSON = "JSON" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CliCommandRegister ¶
type CliCommandRegister interface { // RegisterCommands registers the commands for the client. RegisterCommands(command *cobra.Command) error // AddFlags adds the flags for the client. AddFlags(flagSet *flag.FlagSet) error }
CliCommandRegister is the interface for the command register.
type CliInitializer ¶
type CliInitializer interface { // GetCliInfo returns the infos of the commands. GetCliInfo() CliInfo // GetCommandRegisters returns the command registers. GetCommandRegisters(v *viper.Viper) ([]CliCommandRegister, error) }
CliInitializer is the cli initializer.
type CliPrinter ¶
type CliPrinter struct {
// contains filtered or unexported fields
}
CliPrinter is the cli printer.
func NewCliPrinter ¶
func NewCliPrinter(output string) (*CliPrinter, error)
NewCliPrinter returns a new cli printer.
func (*CliPrinter) Print ¶
func (cp *CliPrinter) Print(output map[string]any)
Print prints the output.
Click to show internal directories.
Click to hide internal directories.