Documentation ¶
Index ¶
- Constants
- func FilterTag(tagSub string, tags []string) ([]string, string)
- type Composit
- type Element
- type RegexValidator
- type Type
- func FromSchema(name string, schema *spec.Schema, required bool, ...) (*Type, error)
- func FromSimpleSchema(name string, schema *spec.SimpleSchema, required bool, ...) (*Type, error)
- func New(composit Composit, name, typ string, required, nestable bool, tags ...string) *Type
- func NewArray(name string, required bool, elementType *Type) *Type
- func NewEnum(name string, required bool, values []interface{}) (*Type, error)
- func NewFile(name string, required bool) *Type
- func NewMap(name string, required bool, elementType *Type) *Type
- func NewObject(name string, required bool) *Type
Constants ¶
View Source
const ( BooleanType = "bool" StringType = "string" Float64Type = "float64" Float32Type = "float32" Int64Type = "int64" IntType = "int" Int32Type = "int32" ByteType = "byte" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RegexValidator ¶
type Type ¶
type Type struct { Composit Composit Name string Type string Validation string Nestable bool Required bool Elements []Element Validator *RegexValidator }
func FromSchema ¶
func FromSimpleSchema ¶
func FromSimpleSchema(name string, schema *spec.SimpleSchema, required bool, validations *spec.CommonValidations) (*Type, error)
func (*Type) GetValidators ¶
func (typ *Type) GetValidators() []*RegexValidator
Click to show internal directories.
Click to hide internal directories.