Documentation ¶
Index ¶
- func GenGolang(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string)
- type TplBaseTypeData
- type TplCRC32
- type TplCRC32Info
- type TplCodecDataList
- type TplFunctionDataList
- type TplMessageData
- type TplPackageData
- type TplParam
- type TplPredicateData
- type TplSchemaData
- type TplServiceData
- type TplServiceDataList
- type TplVector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenGolang ¶
func GenGolang(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string)
Types ¶
type TplBaseTypeData ¶
type TplBaseTypeData struct { Name string ParamList []TplParam // Line string ResType string // 所有的子类 SubMessageList []*TplMessageData }
Base类型
type TplCRC32 ¶
type TplCRC32 struct {
CRC32List []*TplCRC32Info
}
type TplCRC32Info ¶
type TplCodecDataList ¶
type TplCodecDataList struct { PackageGo string PackageJava string SchemaList []string BaseTypePredicateList []*TplBaseTypeData BaseTypeList []*TplBaseTypeData RequestList []*TplMessageData RequestPredicateList []*TplMessageData CRC32List []*TplCRC32Info VectorResList []TplVector }
types
type TplFunctionDataList ¶
type TplFunctionDataList struct { RequestList []*TplMessageData // Vector是非标准proto消息,故要自动生成一个Vector包装proto消息 // 注意去重 VectorResList []TplParam // RpcList // service RPCAuth { // rpc auth_checkPhone(TL_auth_checkPhone) returns (auth_CheckedPhone) {} // } ServiceList []*TplBaseTypeData }
functions
type TplMessageData ¶
type TplMessageData struct { Predicate string Name string // 碰撞的字段名,特殊处理 ParamList []TplParam ResType string SchemaDatas []*TplSchemaData PredicateDatas []*TplPredicateData }
对应生成proto消息
type TplPackageData ¶
type TplPredicateData ¶
type TplSchemaData ¶
type TplSchemaData struct { SchemaName string PredicateDatas []*TplPredicateData }
type TplServiceData ¶
type TplServiceDataList ¶
type TplServiceDataList struct {
ServiceList map[string][]*TplServiceData
}
functions
Click to show internal directories.
Click to hide internal directories.