Documentation
¶
Overview ¶
Package commandsgen is built to read the YAML format described in temporalcli/commandsgen/commands.yml and generate code from it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandsYAML []byte
Functions ¶
func GenerateCommandsCode ¶
Types ¶
type Command ¶
type Command struct {
FullName string `yaml:"name"`
NamePath []string
Summary string `yaml:"summary"`
Description string `yaml:"description"`
DescriptionPlain string
DescriptionHighlighted string
Deprecated string `yaml:"deprecated"`
HasInit bool `yaml:"has-init"`
ExactArgs int `yaml:"exact-args"`
MaximumArgs int `yaml:"maximum-args"`
IgnoreMissingEnv bool `yaml:"ignores-missing-env"`
SubcommandsOptional bool `yaml:"subcommands-optional"`
Options []Option `yaml:"options"`
OptionSets []string `yaml:"option-sets"`
Docs Docs `yaml:"docs"`
}
Command represents the structure of each command in the commands map.
type Commands ¶
type Commands struct {
CommandList []Command `yaml:"commands"`
OptionSets []OptionSets `yaml:"option-sets"`
}
Commands represents the top-level structure holding commands and option sets.
func ParseCommands ¶
type Docs ¶
type Docs struct {
Keywords []string `yaml:"keywords"`
DescriptionHeader string `yaml:"description-header"`
Tags []string `yaml:"tags"`
}
Docs represents docs-only information that is not used in CLI generation.
type Option ¶
type Option struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
DisplayType string `yaml:"display-type"`
Description string `yaml:"description"`
Deprecated string `yaml:"deprecated"`
Short string `yaml:"short,omitempty"`
Default string `yaml:"default,omitempty"`
Env string `yaml:"env,omitempty"`
ImpliedEnv string `yaml:"implied-env,omitempty"`
Required bool `yaml:"required,omitempty"`
Aliases []string `yaml:"aliases,omitempty"`
EnumValues []string `yaml:"enum-values,omitempty"`
Experimental bool `yaml:"experimental,omitempty"`
HiddenLegacyValues []string `yaml:"hidden-legacy-values,omitempty"`
}
Option represents the structure of an option within option sets.
type OptionSets ¶
type OptionSets struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Options []Option `yaml:"options"`
}
OptionSets represents the structure of option sets.
Click to show internal directories.
Click to hide internal directories.