Versions in this module Expand all Collapse all v1 v1.0.1 Sep 8, 2020 v1.0.0 Sep 8, 2020 Changes in this version + const XEnumOptions + const XGoFieldName + const XGoStarLevel + const XGoVendorType + const XID + const XStatusErrs + const XTagJSON + const XTagMime + const XTagName + const XTagValidate + const XTagXML + func ParseStatusErrMsg(s string) (string, bool) + type DefinitionScanner struct + func NewDefinitionScanner(pkg *packagex.Package) *DefinitionScanner + func (scanner *DefinitionScanner) BindSchemas(openapi *oas.OpenAPI) + func (scanner *DefinitionScanner) Def(typeName *types.TypeName) *oas.Schema + func (scanner *DefinitionScanner) GetSchemaByType(typ types.Type) *oas.Schema + type EnumScanner struct + EnumSet map[*types.TypeName][]enumeration.EnumOption + func NewEnumScanner(pkg *packagex.Package) *EnumScanner + func (scanner *EnumScanner) Enum(typeName *types.TypeName) []enumeration.EnumOption + type Operator struct + Description string + NonBodyParameters map[string]*oas.Parameter + RequestBody *oas.RequestBody + StatusErrorSchema *oas.Schema + StatusErrors []*status_error.StatusError + SuccessResponse *oas.Response + SuccessStatus int + SuccessType types.Type + Tag string + func (operator *Operator) AddNonBodyParameter(parameter *oas.Parameter) + func (operator *Operator) BindOperation(method string, operation *oas.Operation, last bool) + func (operator *Operator) SetRequestBody(requestBody *oas.RequestBody) + type OperatorScanner struct + func NewOperatorScanner(pkg *packagex.Package) *OperatorScanner + func (scanner *OperatorScanner) Operator(typeName *types.TypeName) *Operator + type OperatorWithTypeName struct + TypeName *types.TypeName + func (operator *OperatorWithTypeName) String() string + type Route struct + Operators []*OperatorWithTypeName + func (route *Route) Method() string + func (route *Route) Path() string + func (route *Route) String() string + type Router struct + func NewRouter(typeVar *types.Var, operators ...*OperatorWithTypeName) *Router + func (router *Router) AppendOperators(operators ...*OperatorWithTypeName) + func (router *Router) Name() string + func (router *Router) Register(r *Router) + func (router *Router) Route() *Route + func (router *Router) Routes() (routes []*Route) + func (router *Router) String() string + func (router *Router) With(operators ...*OperatorWithTypeName) + type RouterScanner struct + func NewRouterScanner(pkg *packagex.Package) *RouterScanner + func (scanner *RouterScanner) OperatorScanner() *OperatorScanner + func (scanner *RouterScanner) OperatorTypeNameFromType(typ types.Type) *OperatorWithTypeName + func (scanner *RouterScanner) OperatorTypeNamesFromArgs(pkg *packagex.Package, args ...ast.Expr) []*OperatorWithTypeName + func (scanner *RouterScanner) Router(typeName *types.Var) *Router + type SchemaRefer struct + func NewSchemaRefer(s *oas.Schema) *SchemaRefer + func (r SchemaRefer) RefString() string + type StatusErrScanner struct + StatusErrType *types.Named + func NewStatusErrScanner(pkg *packagex.Package) *StatusErrScanner + func (scanner *StatusErrScanner) StatusErrorsInFunc(typeFunc *types.Func) []*status_error.StatusError + type StatusErrorScanner struct + StatusErrors map[*types.TypeName][]*status_error.StatusError + func NewStatusErrorScanner(pkg *packagex.Package) *StatusErrorScanner + func (scanner *StatusErrorScanner) StatusError(typeName *types.TypeName) []*status_error.StatusError + type StructFieldUniqueChecker map[string]*types.Var + func (checker StructFieldUniqueChecker) Check(structType *types.Struct, anonymous bool) error + type VendorExtensible interface + AddExtension func(key string, value interface{})