Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { GetDescription() Description GetParameters() []Parameter }
type Description ¶
type Parameter ¶
type Parameter struct { Name string `yaml:"name"` ShortFlag string `yaml:"shortFlag,omitempty"` Type string `yaml:"type"` Help string `yaml:"help,omitempty"` Default *interface{} `yaml:"default,omitempty"` Choices []string `yaml:"choices,omitempty"` Required bool `yaml:"required,omitempty"` IsArgument bool `yaml:"-"` }
type ParameterType ¶
type ParameterType string
const ( ParameterTypeString ParameterType = "string" // ParameterTypeFile and ParameterTypeFileList are a more elaborate version that loads and parses // the file content and returns a list of FileData objects (or a single object in the case // of ParameterTypeFile). ParameterTypeFile ParameterType = "file" ParameterTypeFileList ParameterType = "fileList" ParameterTypeObjectListFromFile ParameterType = "objectListFromFile" ParameterTypeObjectListFromFiles ParameterType = "objectListFromFiles" ParameterTypeObjectFromFile ParameterType = "objectFromFile" ParameterTypeStringListFromFile ParameterType = "stringListFromFile" ParameterTypeStringListFromFiles ParameterType = "stringListFromFiles" // ParameterTypeKeyValue signals either a string with comma separate key-value options, // or when beginning with @, a file with key-value options ParameterTypeKeyValue ParameterType = "keyValue" ParameterTypeInteger ParameterType = "int" ParameterTypeFloat ParameterType = "float" ParameterTypeBool ParameterType = "bool" ParameterTypeDate ParameterType = "date" ParameterTypeStringList ParameterType = "stringList" ParameterTypeIntegerList ParameterType = "intList" ParameterTypeFloatList ParameterType = "floatList" ParameterTypeChoice ParameterType = "choice" ParameterTypeChoiceList ParameterType = "choiceList" )
Click to show internal directories.
Click to hide internal directories.