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) (fieldsSlice []misc.InterfaceMap, 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) MakeTypeFlatModel() (err error)
- func (chains *Chains) Prepare(m string) (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) FlagRequestDontMakeFlatModel = Flags(0x00000002) FlagResponseIsNotArray = Flags(0x00000004) FlagCreateReturnsObject = Flags(0x00000008) FlagChainDefault = Flags(0x00000001) FlagChainEnableTail = Flags(0x00000002) // VarName VarIgnore = "_" VarID = "ID" VarGUID = "GUID" VarName = "Name" VarStatus = "Status" // Имена тегов полей в описании query параметров TagJSON = "json" TagDB = "db" TagSample = "sample" TagComment = "comment" TagRequired = "required" TagReadonly = "readonly" TagRole = "role" TagRef = "ref" TagDefault = "default" TagEnum = "enum" TagOAtype = "oaType" TagOAformat = "oaFormat" 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"`
InHeaders misc.StringMap `json:"inHeaders,omitempty"` // name -> description
OutHeaders misc.StringMap `json:"outHeaders,omitempty"` // name -> description
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
RequestRequiredFields misc.StringMap `json:"-"` // обязательные поля, значение - его tag db
RequestReadonlyFields 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 *db.FieldsList `json:"-"`
// contains filtered or unexported fields
}
func (*Chains) ExtractFieldsFromBody ¶
func (chains *Chains) ExtractFieldsFromBody(body []byte) (fieldsSlice []misc.InterfaceMap, err error)
func (*Chains) MakeTypeFlatModel ¶ added in v2.0.37
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.