Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type DefineStruct ¶ added in v1.1.3
func (DefineStruct) GetBodyMembers ¶ added in v1.1.3
func (t DefineStruct) GetBodyMembers() []Member
func (DefineStruct) GetFormMembers ¶ added in v1.1.3
func (t DefineStruct) GetFormMembers() []Member
func (DefineStruct) GetNonBodyMembers ¶ added in v1.1.3
func (t DefineStruct) GetNonBodyMembers() []Member
func (DefineStruct) Name ¶ added in v1.1.3
func (t DefineStruct) Name() string
type Group ¶
type Group struct {
Annotation Annotation
Routes []Route
}
func (Group) GetAnnotation ¶ added in v1.1.3
type Info ¶
type Info struct {
// Deprecated: use Properties instead
Title string
// Deprecated: use Properties instead
Desc string
// Deprecated: use Properties instead
Version string
// Deprecated: use Properties instead
Author string
// Deprecated: use Properties instead
Email string
Properties map[string]string
}
type InterfaceType ¶
type InterfaceType struct {
RawName string
}
func (InterfaceType) Name ¶ added in v1.1.3
func (t InterfaceType) Name() string
type MapType ¶
type Member ¶
type Member struct {
Name string
// 数据类型字面值,如:string、map[int]string、[]int64、[]*User
Type Type
Tag string
Comment string
// 成员头顶注释说明
Docs Doc
IsInline bool
}
func (Member) GetComment ¶
func (Member) GetPropertyName ¶
func (Member) IsBodyMember ¶
func (Member) IsFormMember ¶ added in v1.1.3
func (Member) IsOmitEmpty ¶ added in v1.1.3
func (Member) IsOmitempty ¶
func (Member) IsOptional ¶
type PointerType ¶
func (PointerType) Name ¶ added in v1.1.3
func (t PointerType) Name() string
type PrimitiveType ¶ added in v1.1.3
type PrimitiveType struct {
RawName string
}
系统预设基本数据类型 bool int32 int64 float32
func (PrimitiveType) Name ¶ added in v1.1.3
func (t PrimitiveType) Name() string
type Route ¶
type Route struct {
Annotation Annotation
Method string
Path string
RequestType Type
ResponseType Type
Docs Doc
Handler string
AtDoc AtDoc
}
func (Route) GetAnnotation ¶ added in v1.1.3
func (Route) RequestTypeName ¶ added in v1.1.3
func (Route) ResponseTypeName ¶ added in v1.1.3
type Tag ¶ added in v1.1.0
type Tag struct {
// Key is the tag key, such as json, xml, etc..
// i.e: `json:"foo,omitempty". Here key is: "json"
Key string
// Name is a part of the value
// i.e: `json:"foo,omitempty". Here name is: "foo"
Name string
// Options is a part of the value. It contains a slice of tag options i.e:
// `json:"foo,omitempty". Here options is: ["omitempty"]
Options []string
}
Click to show internal directories.
Click to hide internal directories.