Documentation ¶
Index ¶
- type Document
- type Documents
- func (documents Documents) Add(endpoint Endpoint) Documents
- func (documents Documents) Latest() (document Document)
- func (documents Documents) Len() int
- func (documents Documents) Less(i, j int) bool
- func (documents Documents) Swap(i, j int)
- func (documents Documents) Version(ver versions.Version) (document Document, has bool)
- type Element
- func Any() Element
- func Array(item Element) Element
- func Bool() Element
- func Bytes() Element
- func Complex128() Element
- func Complex64() Element
- func Date() Element
- func DateTime() Element
- func Duration() Element
- func Empty() Element
- func Float32() Element
- func Float64() Element
- func Ident(path string, name string, target Element) Element
- func Int() Element
- func Int32() Element
- func Int64() Element
- func JsonRaw() Element
- func Map(value Element) Element
- func NewElement(path string, name string, typ string, format string, title string, ...) Element
- func Nil() Element
- func Password() Element
- func Ref(path string, name string) Element
- func String() Element
- func Struct(path string, name string) Element
- func Time() Element
- func Uint() Element
- func Uint32() Element
- func Uint64() Element
- func Uint8() Element
- func Unknown() Element
- func (element Element) AddEnum(v ...string) Element
- func (element Element) AddProperty(name string, prop Element) Element
- func (element Element) AsDeprecated() Element
- func (element Element) AsPassword() Element
- func (element Element) AsRequired() Element
- func (element Element) Exist() bool
- func (element Element) GetItem() (v Element, has bool)
- func (element Element) IsAdditional() (ok bool)
- func (element Element) IsAny() (ok bool)
- func (element Element) IsArray() (ok bool)
- func (element Element) IsBuiltin() (ok bool)
- func (element Element) IsEmpty() (ok bool)
- func (element Element) IsObject() (ok bool)
- func (element Element) IsRef() (ok bool)
- func (element Element) Key() (v string)
- func (element Element) SetDescription(description string) Element
- func (element Element) SetFormat(format string) Element
- func (element Element) SetName(name string) Element
- func (element Element) SetPath(path string) Element
- func (element Element) SetTitle(title string) Element
- func (element Element) SetValidation(validation Validation) Element
- type ElementValidation
- type Elements
- type Endpoint
- type Endpoints
- type Error
- type ErrorDescription
- type ErrorDescriptions
- type Errors
- type Fn
- func (fn Fn) AddError(err Error) Fn
- func (fn Fn) SetAuthorization(authorization bool) Fn
- func (fn Fn) SetDeprecated(deprecated bool) Fn
- func (fn Fn) SetErrors(err string) Fn
- func (fn Fn) SetInfo(title string, description string) Fn
- func (fn Fn) SetInternal(internal bool) Fn
- func (fn Fn) SetParam(param Element) Fn
- func (fn Fn) SetPermission(permission bool) Fn
- func (fn Fn) SetReadonly(readonly bool) Fn
- func (fn Fn) SetResult(result Element) Fn
- type Fns
- type I18n
- type I18ns
- type Properties
- type Property
- type Validation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Element ¶
type Element struct { Nil bool `json:"non" avro:"nil"` Path string `json:"path,omitempty" avro:"path"` Name string `json:"name,omitempty" avro:"name"` Title string `json:"title,omitempty" avro:"title"` Description string `json:"description,omitempty" avro:"description"` Type string `json:"type,omitempty" avro:"type"` Format string `json:"format,omitempty" avro:"format"` Enums []string `json:"enums,omitempty" avro:"enums"` Required bool `json:"required,omitempty" avro:"required"` Validation Validation `json:"validation,omitempty" avro:"validation"` Properties Properties `json:"properties,omitempty" avro:"properties"` Additional bool `json:"additional,omitempty" avro:"additional"` Deprecated bool `json:"deprecated,omitempty" avro:"deprecated"` }
func Complex128 ¶
func Complex128() Element
func NewElement ¶
func (Element) AsDeprecated ¶
func (Element) AsPassword ¶
func (Element) AsRequired ¶
func (Element) IsAdditional ¶ added in v1.1.1
func (Element) SetDescription ¶
func (Element) SetValidation ¶
func (element Element) SetValidation(validation Validation) Element
type ElementValidation ¶
type ElementValidation struct { Name string `json:"name,omitempty" avro:"name"` I18n map[string]string `json:"i18n,omitempty" avro:"i18N"` }
func NewElementValidation ¶
func NewElementValidation(name string, i18ns ...string) (v *ElementValidation)
type Endpoint ¶
type Endpoint struct { Id []string `json:"id,omitempty" avro:"id"` Version versions.Version `json:"version" avro:"version"` Name string `json:"name" avro:"name"` Title string `json:"title" avro:"title"` Description string `json:"description" avro:"description"` Internal bool `json:"internal" avro:"internal"` Functions Fns `json:"functions" avro:"functions"` Elements Elements `json:"elements" avro:"elements"` }
func (*Endpoint) SetInternal ¶ added in v1.2.0
func (endpoint *Endpoint) SetInternal()
type Error ¶
type Error struct { Name string `json:"name" avro:"name"` Descriptions ErrorDescriptions `json:"descriptions" avro:"descriptions"` }
type ErrorDescription ¶
type ErrorDescriptions ¶
type ErrorDescriptions []ErrorDescription
func (ErrorDescriptions) Add ¶
func (pp ErrorDescriptions) Add(name string, value string) ErrorDescriptions
func (ErrorDescriptions) Len ¶
func (pp ErrorDescriptions) Len() int
func (ErrorDescriptions) Less ¶
func (pp ErrorDescriptions) Less(i, j int) bool
func (ErrorDescriptions) Swap ¶
func (pp ErrorDescriptions) Swap(i, j int)
type Errors ¶
type Errors []Error
Errors use @errors @errors >>>
name1 zh: chinese en: english name2 zh: chinese en: english
<<<
type Fn ¶
type Fn struct { Name string `json:"name,omitempty" avro:"name"` Title string `json:"title,omitempty" avro:"title"` Description string `json:"description,omitempty" avro:"description"` Deprecated bool `json:"deprecated,omitempty" avro:"deprecated"` Internal bool `json:"internal,omitempty" avro:"internal"` Readonly bool `json:"readonly,omitempty" avro:"readonly"` Authorization bool `json:"authorization,omitempty" avro:"authorization"` Permission bool `json:"permission,omitempty" avro:"permission"` Param Element `json:"argument,omitempty" avro:"param"` Result Element `json:"result,omitempty" avro:"result"` Errors Errors `json:"errors,omitempty" avro:"errors"` }
func (Fn) SetAuthorization ¶
func (Fn) SetDeprecated ¶
func (Fn) SetInternal ¶
func (Fn) SetPermission ¶
func (Fn) SetReadonly ¶
type Properties ¶
type Properties []Property
func (Properties) Add ¶
func (pp Properties) Add(name string, element Element) Properties
func (Properties) Len ¶
func (pp Properties) Len() int
func (Properties) Less ¶
func (pp Properties) Less(i, j int) bool
func (Properties) Swap ¶
func (pp Properties) Swap(i, j int)
type Validation ¶
type Validation struct { Enable bool `json:"enable,omitempty" avro:"enable"` Name string `json:"name,omitempty" avro:"name"` I18ns I18ns `json:"i18ns,omitempty" avro:"i18Ns"` }
func NewValidation ¶
func NewValidation(name string) Validation
func (Validation) AddI18n ¶
func (validation Validation) AddI18n(name string, value string) Validation
Click to show internal directories.
Click to hide internal directories.