Documentation ¶
Index ¶
Constants ¶
View Source
const ( FormatTabs = Format("tabs") FormatTable = Format("table") )
Variables ¶
View Source
var ( String = NewFieldType("string", reflect.String, reflect.Interface) ProtoEnum = NewFieldType("string") Enum = NewFieldType("string") Number = NewFieldType("number", reflect.Int32, reflect.Uint32, reflect.Int64, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.Int16, reflect.Int32, reflect.Uint16, reflect.Uint32, reflect.Int8, reflect.Uint8, reflect.Int, reflect.Uint, ) Map = NewFieldType("map", reflect.Map) Object = NewFieldType("object", reflect.Struct) Array = NewFieldType("array", reflect.Array, reflect.Slice) Boolean = NewFieldType("boolean", reflect.Bool) Null = NewFieldType("null") FieldTypes = []*FieldType{String, Enum, ProtoEnum, Number, Map, Object, Array, Boolean, Null} )
View Source
var (
ReqiredByDefault = true
)
Functions ¶
This section is empty.
Types ¶
type FieldType ¶
type FieldType struct {
// contains filtered or unexported fields
}
func (*FieldType) MarshalJSON ¶
func (*FieldType) UnmarshalJSON ¶
type JsonSchema ¶
type JsonSchema struct { Type *FieldType `json:"type"` Properties map[string]*JsonSchema `json:"properties,omitempty"` Items *JsonSchema `json:"items,omitempty"` AdditionalProperties bool `json:"additionalProperties"` }
type Value ¶
type Value struct { Type *FieldType `json:"type"` Properties map[string]*Value `json:"properties,omitempty"` Required bool `json:"required"` Items *Value `json:"items,omitempty"` Enum []string `json:"enum,omitempty"` Title string `json:"title"` PropertyOrder int `json:"propertyOrder,omitempty"` Format Format `json:"format,omitempty"` Description string `json:"description,omitempty"` HeaderTemplate string `json:"headerTemplate,omitempty"` ReadOnly bool `json:"readOnly,omitempty"` AdditionalProperties bool `json:"additionalProperties,omitempty"` }
Click to show internal directories.
Click to hide internal directories.