Documentation
¶
Index ¶
- func GenProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string)
- func GetBusinessProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
- func GetHandshakeProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
- func GetSyncProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
- func GetTransportProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
- type TplBaseTypeData
- type TplCRC32
- type TplCRC32Info
- type TplFunctionDataList
- type TplMessageData
- type TplParam
- type TplTypesDataList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenProto ¶
func GenProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string)
func GetBusinessProto ¶
func GetBusinessProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
func GetHandshakeProto ¶
func GetHandshakeProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
func GetSyncProto ¶
func GetSyncProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
func GetTransportProto ¶
func GetTransportProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) (*TplTypesDataList, *TplFunctionDataList)
Types ¶
type TplBaseTypeData ¶
type TplBaseTypeData struct {
Name string
ParamList []TplParam
// Line string
ResType string
// 所有的子类
SubMessageList []*TplMessageData
}
Base类型
type TplCRC32 ¶
type TplCRC32 struct {
PackageGo string
PackageJava string
ConstructorList []TplCRC32Info
RequestList []TplCRC32Info
}
func GetCRC32Proto ¶
func GetCRC32Proto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) *TplCRC32
type TplCRC32Info ¶
type TplFunctionDataList ¶
type TplFunctionDataList struct {
PackageGo string
PackageJava string
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 {
Name string
// 碰撞的字段名,特殊处理
ParamList []TplParam
ResType string
Line string
}
对应生成proto消息
type TplTypesDataList ¶
type TplTypesDataList struct {
PackageGo string
PackageJava string
BaseTypeList []TplBaseTypeData
}
types
func GetCoreTypesProto ¶
func GetCoreTypesProto(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName string) *TplTypesDataList
Click to show internal directories.
Click to hide internal directories.