Documentation ¶
Index ¶
- type Node
- func (n *Node) ApplyDefaultsToArr(inp []interface{})
- func (n *Node) ApplyDefaultsToMSI(inp map[string]interface{})
- func (n *Node) Compile() (err error)
- func (n *Node) Scan(value interface{}) error
- func (n *Node) ToProto() *terrariumpb.JSONSchema
- func (n *Node) Validate(val interface{}) error
- func (n Node) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Title string `yaml:"title,omitempty" json:"title,omitempty"` Description string `yaml:"description,omitempty" json:"description,omitempty"` Type string `yaml:"type,omitempty" json:"type,omitempty"` // string, number, integer, boolean, object, array, null Default interface{} `yaml:"default,omitempty" json:"default,omitempty"` Examples []interface{} `yaml:"examples,omitempty" json:"examples,omitempty"` Enum []interface{} `yaml:"enum,omitempty" json:"enum,omitempty"` MinLength int32 `yaml:"minLength,omitempty" json:"minLength,omitempty"` MaxLength int32 `yaml:"maxLength,omitempty" json:"maxLength,omitempty"` Pattern string `yaml:"pattern,omitempty" json:"pattern,omitempty"` Format string `yaml:"format,omitempty" json:"format,omitempty"` Minimum int32 `yaml:"minimum,omitempty" json:"minimum,omitempty"` Maximum int32 `yaml:"maximum,omitempty" json:"maximum,omitempty"` ExclusiveMinimum int32 `yaml:"exclusiveMinimum,omitempty" json:"exclusiveMinimum,omitempty"` ExclusiveMaximum int32 `yaml:"exclusiveMaximum,omitempty" json:"exclusiveMaximum,omitempty"` MultipleOf int32 `yaml:"multipleOf,omitempty" json:"multipleOf,omitempty"` Items *Node `yaml:"items,omitempty" json:"items,omitempty"` AdditionalItems bool `yaml:"additionalItems,omitempty" json:"additionalItems,omitempty"` MinItems int32 `yaml:"minItems,omitempty" json:"minItems,omitempty"` MaxItems int32 `yaml:"maxItems,omitempty" json:"maxItems,omitempty"` UniqueItems bool `yaml:"uniqueItems,omitempty" json:"uniqueItems,omitempty"` Properties map[string]*Node `yaml:"properties,omitempty" json:"properties,omitempty"` Required []string `yaml:"required,omitempty" json:"required,omitempty"` // contains filtered or unexported fields }
func (*Node) ApplyDefaultsToArr ¶
func (n *Node) ApplyDefaultsToArr(inp []interface{})
func (*Node) ApplyDefaultsToMSI ¶
func (*Node) Scan ¶
Implement the sql.Scanner interface to take care of unmarshaling the serialized form (stored in the database) into the Go Node structure
func (*Node) ToProto ¶
func (n *Node) ToProto() *terrariumpb.JSONSchema
Click to show internal directories.
Click to hide internal directories.