Documentation ¶
Index ¶
- func GenGolang(schemas *mtproto_parser.MTProtoSchemas, outFilePath string)
- func IsLetter(b byte) bool
- func IsLower(b byte) bool
- func IsSpace(b byte) bool
- func IsSpaceQuote(b byte) bool
- func IsUpper(b byte) bool
- func ToAbridge(str string) string
- func ToCamel(s string) string
- func ToLower(b byte) byte
- func ToLowerAbridge(str string) (s string)
- func ToLowerString(b byte) string
- func ToSnake(s string) string
- func ToUpper(b byte) byte
- func ToUpperString(b byte) string
- type TplBaseTypeData
- type TplCRC32
- type TplCRC32Info
- type TplCodecDataList
- type TplFunctionDataList
- type TplMessageData
- type TplParam
- type TplServiceData
- type TplServiceDataList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenGolang ¶
func GenGolang(schemas *mtproto_parser.MTProtoSchemas, outFilePath string)
func IsSpaceQuote ¶
IsSpaceQuote return wehter a byte is space or quote characters
func ToAbridge ¶
ToAbridge extract first letter and all upper case letter from string as it's abridge case
func ToCamel ¶
ToCamel string, xx_yy to XxYy, xx__yy to Xx_Yy xx _yy to Xx Yy, the rule is that a lower case letter after '_' will combine to a upper case letter
func ToLowerAbridge ¶
ToLowerAbridge extract first letter and all upper case letter from string as it's abridge case, and convert it to lower case
func ToLowerString ¶
ToLowerString convert a byte to lower case string
func ToUpperString ¶
ToUpperString convert a byte to upper case 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 { BaseTypeList []TplBaseTypeData RequestList []TplMessageData CRC32List []TplCRC32Info }
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 Line string EncodeCodeList []string DecodeCodeList []string }
对应生成proto消息
type TplServiceData ¶
type TplServiceDataList ¶
type TplServiceDataList struct {
ServiceList map[string][]TplServiceData
}
functions
Click to show internal directories.
Click to hide internal directories.