golang

package
v0.0.0-...-620b93c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2024 License: MIT, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenGolang

func GenGolang(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName, protoType string)

func GetWorkingDirectory

func GetWorkingDirectory() string

Types

type ClientDatas

type ClientDatas struct {
	PackageGo   string
	PackageJava string
	ServiceList []TplServiceData
}

func GetRpcClientRegister

func GetRpcClientRegister(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName, protoType string) *ClientDatas

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 TplCRC32Info struct {
	Name string
	Type string
}

type TplCodecDataList

type TplCodecDataList struct {
	PackageGo             string
	PackageJava           string
	BaseTypePredicateList []*TplBaseTypeData
	BaseTypeList          []*TplBaseTypeData
	RequestList           []*TplMessageData
	RequestPredicateList  []*TplMessageData
	CRC32List             []*TplCRC32Info
	VectorResList         []TplVector
	ProtoType             string
}

types

func GetClassNameRegister

func GetClassNameRegister(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName, protoType string) *TplCodecDataList

func GetCodecSchema

func GetCodecSchema(schemas []parser.MTProtoSchemasFixed, outFilePath, packageName, protoType string) *TplCodecDataList

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

	PredicateDatas []*TplPredicateData
}

对应生成proto消息

type TplPackageData

type TplPackageData struct {
	RPCPackage string
	RPCName    string
}

type TplParam

type TplParam struct {
	Type  string
	Name  string
	Name2 string
	Index int
}

参数列表

type TplPredicateData

type TplPredicateData struct {
	Id        int32
	TypeId    string
	Predicate string
	Layer     string
	Name      string
	Line      string
	ParamList []TplParam

	ParserParams   []parser.Param
	EncodeCodeList []string
	DecodeCodeList []string
}

type TplServiceData

type TplServiceData struct {
	RPCPackage   string
	RPCName      string
	MethodName   string
	RequestName  string
	ResponseName string
	Line         string
}

type TplServiceDataList

type TplServiceDataList struct {
	ServiceList map[string][]*TplServiceData
}

functions

type TplVector

type TplVector struct {
	Name       string
	Type       string
	EncodeCode string
	DecodeCode string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL