Documentation
¶
Index ¶
- func GenSwift(schemas parser.MTProtoSchemasFixed, outFilePath string)
- func GetApi0Tpl(tplApi *TplApiInfo, outFilePath string)
- func GetApiNTpl(tplApi *TplApiInfo, outFilePath string)
- type TplApiInfo
- type TplBaseTypeData
- type TplCRC32
- type TplCRC32Info
- type TplCodecDataList
- type TplFunctionDataList
- type TplMessageData
- type TplPackageData
- type TplParam
- type TplPredicateData
- type TplServiceData
- type TplServiceDataList
- type TplVector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenSwift ¶
func GenSwift(schemas parser.MTProtoSchemasFixed, outFilePath string)
func GetApi0Tpl ¶
func GetApi0Tpl(tplApi *TplApiInfo, outFilePath string)
func GetApiNTpl ¶
func GetApiNTpl(tplApi *TplApiInfo, outFilePath string)
Types ¶
type TplApiInfo ¶
type TplApiInfo struct {
ConstructorListBase []string
FunctionListBase []string
BaseTypeList []*TplBaseTypeData
RequestList []*TplMessageData
}
type TplBaseTypeData ¶
type TplBaseTypeData struct {
Name string
Name2 string
NameSpace string
NameSpaceDisplay string
EnumIndirect string
ParamList []TplParam
ResType string
ResType2 string
SubMessageList []*TplMessageData
}
Base类型
type TplCRC32 ¶
type TplCRC32 struct {
CRC32List []*TplCRC32Info
}
type TplCRC32Info ¶
type TplCodecDataList ¶
type TplCodecDataList struct {
PackageGo string
PackageJava 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
NameSpace string
NameSpaceDisplay string
ParamList []TplParam
ResType string
ResType2 string
PredicateDatas []*TplPredicateData
}
对应生成proto消息
type TplPackageData ¶
type TplPredicateData ¶
type TplPredicateData struct {
Id int32
TypeId string
Predicate string
Layer string
Name string
ShortName string
NameSpace string
NameSpaceDisplay string
Line string
ParamList []TplParam
ResType string
ResType2 string
ParserParams []parser.Param
EncodeCodeList []string
DecodeCodeList []string
ParamListDisplay string
ParamListDeclare string
ParamListReturn string
ParamListDescription string
}
type TplServiceData ¶
type TplServiceDataList ¶
type TplServiceDataList struct {
ServiceList map[string][]*TplServiceData
}
functions
Click to show internal directories.
Click to hide internal directories.