Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TypeMapping = map[string]string{
"bool": "bool",
"int": "i64",
"int8": "byte",
"int16": "i16",
"int32": "i32",
"int64": "i64",
"uint": "i64",
"uint8": "byte",
"uint16": "i16",
"uint32": "i32",
"uint64": "i64",
"byte": "byte",
"float32": "double",
"float64": "double",
"string": "string",
}
Functions ¶
This section is empty.
Types ¶
type Struct ¶
type Struct struct { Name string StructFields []*StructField }
func ConvertStruct ¶
func ConvertStruct(name, repoPath, repoImport, curPath string, astSt *ast.StructType, astFile *ast.File) (*Struct, error)
ConvertStruct is used to convert *ast.StructType to *transformer.Struct.
name: struct name. repoPath: the goMod path where the structure is located. repoImport: the goMod where the structure is located. curPath: the directory where the structure is located.
func (*Struct) GenerateSingle ¶
GenerateSingle is used to check if the structural versions of the client and server are consistent.
type StructField ¶
type ThriftFile ¶
type ThriftFile struct { Name string Namespace string Structs []*Struct Service *Service // contains filtered or unexported fields }
func NewThriftFile ¶
func NewThriftFile() *ThriftFile
Click to show internal directories.
Click to hide internal directories.