Documentation
¶
Index ¶
- type Element
- func Array(name string, title string, description string, item *Element) *Element
- func Bool() *Element
- func Date() *Element
- func DateTime() *Element
- func Empty() *Element
- func Float32() *Element
- func Float64() *Element
- func Int() *Element
- func Int32() *Element
- func Int64() *Element
- func JsonRaw() *Element
- func Map(name string, title string, description string, item *Element) *Element
- func NewElement(pkg string, name string, typ string, format string, title string, ...) *Element
- func RefStruct(pkg string, name string) *Element
- func String() *Element
- func Struct(pkg string, name string, title string, description string) *Element
- func (element *Element) AddEnum(v ...interface{}) *Element
- func (element *Element) AddProperty(name string, prop *Element) *Element
- func (element *Element) AsDeprecated() *Element
- func (element *Element) AsRequired(validation string) *Element
- func (element *Element) Key() (v string)
- func (element *Element) Schema() (v *oas.Schema)
- func (element *Element) SetDescription(description string) *Element
- func (element *Element) SetExample(example interface{}) *Element
- func (element *Element) SetFormat(format string) *Element
- func (element *Element) SetTitle(title string) *Element
- func (element *Element) SetValidation(validation string) *Element
- type Fn
- func (fn *Fn) Argument() (argument service.ElementDocument)
- func (fn *Fn) Authorization() (has bool)
- func (fn *Fn) Deprecated() (deprecated bool)
- func (fn *Fn) Description() (description string)
- func (fn *Fn) Name() (name string)
- func (fn *Fn) Result() (result service.ElementDocument)
- func (fn *Fn) Title() (title string)
- type Service
- func (svc *Service) AddFn(name string, title string, description string, hasAuthorization bool, ...)
- func (svc *Service) Description() (description string)
- func (svc *Service) Elements() (elements map[string]service.ElementDocument)
- func (svc *Service) Fns() (fns []service.FnDocument)
- func (svc *Service) Name() (name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct { Package string `json:"package,omitempty"` Name string `json:"name,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Type string `json:"type,omitempty"` Format string `json:"format,omitempty"` Enum []interface{} `json:"enum,omitempty"` Required bool `json:"required,omitempty"` Validation string `json:"validation,omitempty"` Properties map[string]*Element `json:"properties,omitempty"` Additional bool `json:"additional,omitempty"` Deprecated bool `json:"deprecated,omitempty"` Example interface{} `json:"example,omitempty"` }
func NewElement ¶
func (*Element) AddProperty ¶
func (*Element) AsDeprecated ¶
func (*Element) AsRequired ¶
func (*Element) SetDescription ¶
func (*Element) SetExample ¶
func (*Element) SetValidation ¶
type Fn ¶
type Fn struct { Name_ string `json:"name,omitempty"` Title_ string `json:"title,omitempty"` Description_ string `json:"description,omitempty"` Authorization_ bool `json:"authorization,omitempty"` Argument_ *Element `json:"argument,omitempty"` Result_ *Element `json:"result,omitempty"` Deprecated_ bool `json:"deprecated,omitempty"` }
func (*Fn) Argument ¶
func (fn *Fn) Argument() (argument service.ElementDocument)
func (*Fn) Authorization ¶
func (*Fn) Deprecated ¶
func (*Fn) Description ¶
func (*Fn) Result ¶
func (fn *Fn) Result() (result service.ElementDocument)
type Service ¶
type Service struct { // Name // as tag Name_ string `json:"name"` // Description // as description of tag, support markdown Description_ string `json:"description"` // Fns Fns_ []service.FnDocument `json:"fns"` // Elements Elements_ map[string]service.ElementDocument `json:"elements"` }
func NewService ¶
func (*Service) Description ¶
func (*Service) Elements ¶ added in v0.13.1
func (svc *Service) Elements() (elements map[string]service.ElementDocument)
func (*Service) Fns ¶
func (svc *Service) Fns() (fns []service.FnDocument)
Click to show internal directories.
Click to hide internal directories.