Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiSpec ¶
func (*ApiSpec) ContainsTime ¶
type ArrayType ¶
type ArrayType struct {
StringExpr string
// it can be asserted as BasicType: int、bool、
// PointerType: *string、*User、
// MapType: map[${BasicType}]interface、
// ArrayType:[]int、[]User、[]*User
// InterfaceType: interface{}
// Type
ArrayType interface{}
}
type Group ¶
type Group struct {
Annotations []Annotation
Routes []Route
}
type InterfaceType ¶
type InterfaceType struct {
StringExpr string
}
type Member ¶
type Member struct {
Annotations []Annotation
Name string
// 数据类型字面值,如:string、map[int]string、[]int64、[]*User
Type string
// it can be asserted as BasicType: int、bool、
// PointerType: *string、*User、
// MapType: map[${BasicType}]interface、
// ArrayType:[]int、[]User、[]*User
// InterfaceType: interface{}
// Type
Expr interface{}
Tag string
// Deprecated
Comment string // 换成标准struct中将废弃
// 成员尾部注释说明
Comments []string
// 成员头顶注释说明
Docs []string
IsInline bool
}
func (Member) GetComment ¶
func (Member) GetPropertyName ¶
func (Member) IsBodyMember ¶
func (Member) IsOmitempty ¶
func (Member) IsOptional ¶
type PointerType ¶
type PointerType struct {
StringExpr string
// it can be asserted as BasicType: int、bool、
// PointerType: *string、*User、
// MapType: map[${BasicType}]interface、
// ArrayType:[]int、[]User、[]*User
// InterfaceType: interface{}
// Type
Star interface{}
}
type Route ¶
type Route struct {
Annotations []Annotation
Method string
Path string
RequestType Type
ResponseType Type
}
type StructType ¶
type StructType struct {
StringExpr string
}
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
}
type Type ¶
type Type struct {
Name string
Annotations []Annotation
Members []Member
}
func (Type) GetBodyMembers ¶
func (Type) GetNonBodyMembers ¶
Click to show internal directories.
Click to hide internal directories.