Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UICmd = &cobra.Command{ Use: "ui", Short: "Launch a web based UI tool that uses the CLI", Run: func(cmd *cobra.Command, args []string) { err := Serve(cmd.Root()) if err != nil { log.Fatal(err) } }, }
UICmd is the UI command for running the web server.
Functions ¶
Types ¶
type ApplicationDetails ¶
type ApplicationDetails struct {
AssemblyName string
Command CommandDetail
}
ApplicationDetails is the primary return object.
type CommandDetail ¶
type CommandDetail struct {
Name string `json:"name"`
Use string `json:"use"`
NameAndAliases string `json:"nameandaliases"`
Aliases []string `json:"aliases"`
Root string `json:"root"`
ShortDescription string `json:"short"`
LongDescription string `json:"long"`
Examples string `json:"examples"`
Hidden bool `json:"hidden"`
IsAvailable bool `json:"isavailable"`
HasParent bool `json:"hasparent"`
ParentName string `json:"parentname"`
ParentUse string `json:"parentuse"`
Options OptionDescriptions `json:"options"`
Commands []CommandDetail `json:"commands"`
}
CommandDetail structure contains parent level commands meta data.
func GetCommandDetails ¶
func GetCommandDetails(cmd *cobra.Command) (*CommandDetail, error)
GetCommandDetails gathers all details about a command.
type OptionDescription ¶
type OptionDescription struct {
Name string `json:"name"`
Default interface{} `json:"default"`
Description string `json:"description"`
Hidden bool `json:"hidden"`
Section string `json:"section"`
Type string `json:"type"`
Values string `json:"values,omitempty"`
}
OptionDescription contains a properties that describe a commandline option.
type OptionDescriptions ¶
type OptionDescriptions []OptionDescription
OptionDescriptions contains the descriptions for all commandline options of a command.
Click to show internal directories.
Click to hide internal directories.