2021-01-11 15:10:51 +08:00
|
|
|
package spec
|
|
|
|
|
|
2021-02-26 16:11:47 +08:00
|
|
|
// Name returns a basic string, such as int32,int64
|
2021-01-11 15:10:51 +08:00
|
|
|
func (t PrimitiveType) Name() string {
|
|
|
|
|
return t.RawName
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-26 16:11:47 +08:00
|
|
|
// Name returns a structure string, such as User
|
2021-01-11 15:10:51 +08:00
|
|
|
func (t DefineStruct) Name() string {
|
|
|
|
|
return t.RawName
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-26 16:11:47 +08:00
|
|
|
// Name returns a map string, such as map[string]int
|
2021-01-11 15:10:51 +08:00
|
|
|
func (t MapType) Name() string {
|
|
|
|
|
return t.RawName
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-26 16:11:47 +08:00
|
|
|
// Name returns a slice string, such as []int
|
2021-01-11 15:10:51 +08:00
|
|
|
func (t ArrayType) Name() string {
|
|
|
|
|
return t.RawName
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-26 16:11:47 +08:00
|
|
|
// Name returns a pointer string, such as *User
|
2021-01-11 15:10:51 +08:00
|
|
|
func (t PointerType) Name() string {
|
|
|
|
|
return t.RawName
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-26 16:11:47 +08:00
|
|
|
// Name returns a interface string, Its fixed value is interface{}
|
2021-01-11 15:10:51 +08:00
|
|
|
func (t InterfaceType) Name() string {
|
|
|
|
|
return t.RawName
|
|
|
|
|
}
|