route

package
v0.0.0-...-cc73645 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	String  = "string"
	Integer = "integer"
	Number  = "number"
	Boolean = "boolean"
	Object  = "object"
	Array   = "array"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Param

type Param struct {
	Name        string
	Type        string
	Ref         string
	Required    bool
	Description string
	Default     interface{}
	Format      string `description:"https://json-schema.org/understanding-json-schema/reference/string.html#built-in-formats"`
	Properties  map[string]Param
	Items       []Param
}

func NewArrayParam

func NewArrayParam(name string, description string, required bool, items []Param) Param

func NewBooleanParam

func NewBooleanParam(name string, description string, required bool, defaultValue ...interface{}) Param

func NewExtendedRefArrayParam

func NewExtendedRefArrayParam(name string, description string, required bool, ref string, items []Param) Param

func NewExtendedRefObjectParam

func NewExtendedRefObjectParam(name string, description string, required bool, ref string, properties map[string]Param) Param

func NewIntParam

func NewIntParam(name string, description string, required bool, defaultValue ...interface{}) Param

func NewNumberParam

func NewNumberParam(name string, description string, required bool, defaultValue ...interface{}) Param

func NewObjectParam

func NewObjectParam(name string, description string, required bool, properties map[string]Param) Param

func NewParam

func NewParam(name string, dataType string, description string, required bool, defaultValue ...interface{}) Param

func NewRefArrayParam

func NewRefArrayParam(name string, description string, required bool, ref string) Param

func NewRefObjectParam

func NewRefObjectParam(name string, description string, required bool, ref string) Param

func NewStringParam

func NewStringParam(name string, description string, required bool, defaultValue ...interface{}) Param

type RequestParams

type RequestParams struct {
	Query    []Param
	Body     []Param
	FormData []Param
	Headers  []Param
	Path     []Param
}

type ResponseParams

type ResponseParams struct {
	STDResponse bool
	Success     []Param
	Failure     map[int]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL