Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InputTypeArray = "Array" InputTypeBoolean = "boolean" InputTypeFloat = "float" InputTypeHash = "Hash" InputTypeInteger = "integer" InputTypeList = "list" InputTypeNumber = "number" InputTypeString = "string" )
Functions ¶
func EachFile ¶
EachFile calls cb with a path to every found DD of type kind, stops looking when br is true
func ValToDDLType ¶
ValToDDLType converts val into the type described in typedef where typedef is a typical choria DDL supported type
Types ¶
type InputItem ¶
type InputItem struct { Prompt string `json:"prompt"` Description string `json:"description"` Type string `json:"type"` Default interface{} `json:"default,omitempty"` Optional bool `json:"optional"` Validation string `json:"validation,omitempty"` MaxLength int `json:"maxlength,omitempty"` Enum []string `json:"list,omitempty"` }
InputItem describes an individual input item
func (*InputItem) ConvertStringValue ¶
ConvertStringValue converts a string representing value into the correct type according to the input Type
func (*InputItem) ValidateStringValue ¶
func (i *InputItem) ValidateStringValue(val string) (converted interface{}, warnings []string, err error)
ValidateStringValue converts a value to the appropriate type for this input then validates it
func (*InputItem) ValidateValue ¶
ValidateValue validates a value against this input, should be of the right data type already. See ValToDDLType()
type OutputItem ¶
type OutputItem struct { Description string `json:"description"` DisplayAs string `json:"display_as"` Default interface{} `json:"default,omitempty"` Type string `json:"type,omitempty"` }
OutputItem describes an individual output item
Click to show internal directories.
Click to hide internal directories.