Documentation ¶
Index ¶
- Constants
- func GetKnownObjects() map[string]*Object
- func SaveObject(name string, obj reflect.Type, withArray bool) (err error)
- func StructType(v any) (t reflect.Type, err error)
- type Chain
- type Chains
- func (chains *Chains) Clone() *Chains
- func (chains *Chains) ExtractFieldsFromBody(body []byte) (fields misc.InterfaceMap, notice error, err error)
- func (chains *Chains) Find(path []string) (matched *Chain, pathParams any, code int, err error)
- func (chains *Chains) Len() int
- func (chains *Chains) Less(i, j int) bool
- func (chains *Chains) Prepare() (err error)
- func (c *Chains) Swap(i, j int)
- type ChainsList
- type Flags
- type Method
- type Methods
- type Object
- type Set
- type Token
- type Vars
Constants ¶
View Source
const ( NoFlags = Flags(0x00000000) FlagResponseHashed = Flags(0x00000001) FlagRequestIsNotArray = Flags(0x00000002) FlagRequestDontMakeFlatModel = Flags(0x00000004) FlagResponseIsNotArray = Flags(0x00000008) // VarName VarIgnore = "_" VarID = "ID" VarGUID = "GUID" VarName = "Name" VarStatus = "Status" // Имена тегов полей в описании query параметров TagJSON = "json" TagDB = "db" TagSample = "sample" TagComment = "comment" TagRequired = "required" TagRole = "role" TagRef = "ref" TagDefault = "default" RolePrimary = "primary" RoleKey = "key" StdPrimaryField = VarID )
Variables ¶
This section is empty.
Functions ¶
func GetKnownObjects ¶
Types ¶
type Chain ¶
type Chains ¶
type Chains struct { Flags Flags `json:"flags,omitempty"` Summary string `json:"summary"` Description string `json:"description"` Chains ChainsList `json:"chains"` PathParamsPattern any `json:"pathParams"` PathParamsType reflect.Type `json:"-"` QueryParamsPattern any `json:"queryParams"` QueryParamsType reflect.Type `json:"-"` RequestObjectName string `json:"requestObjectName"` RequestContentType string `json:"requestContentType,omitempty"` // Значение по умолчанию для Content-Type на входе. По умолчанию JSON RequestPattern any `json:"request"` RequestType reflect.Type `json:"-"` RequestFlatModel misc.StringMap `json:"-"` // ключ - путь до поля, значение - его tag db RequestUniqueKeyFields []string `json:"requestUniqueKeyFields"` // уникальные поля, первый - primary key (формально) ResponseObjectName string `json:"responseObjectName"` ResponseContentType string `json:"responseContentType,omitempty"` // Значение по умолчанию для Content-Type на выходе. По умолчанию JSON ResponsePattern any `json:"response"` ResponseType reflect.Type `json:"-"` SrcResponsePattern any `json:"-"` SrcResponseType reflect.Type `json:"-"` DBFields []string `json:"-"` // contains filtered or unexported fields }
func (*Chains) ExtractFieldsFromBody ¶
type ChainsList ¶
type ChainsList []*Chain
func (ChainsList) Clone ¶
func (chainsList ChainsList) Clone() ChainsList
type Set ¶
type Set struct { Flags Flags `json:"flags,omitempty"` Description string `json:"description"` Methods Methods `json:"methods"` }
type Token ¶
type Vars ¶
type Vars misc.InterfaceMap
Click to show internal directories.
Click to hide internal directories.