proto

package
v0.0.0-...-65ee0f0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 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 GenProto

func GenProto(schemas []parser.MTProtoSchemas, outFilePath, packageName, protoType string)

func GetWorkingDirectory

func GetWorkingDirectory() string

Types

type TplBaseTypeData

type TplBaseTypeData struct {
	Name      string
	ParamList []TplParam
	// Line string
	ResType string
	// 所有的子类
	SubMessageList []*TplMessageData
}

Base类型

type TplCRC32Info

type TplCRC32Info struct {
	Name string
	Id   int32
}

type TplMessageData

type TplMessageData struct {
	Name string
	// 碰撞的字段名,特殊处理
	ParamList []TplParam
	ResType   string
	Line      string
}

对应生成proto消息

type TplParam

type TplParam struct {
	OriginType parser.Type
	Type       string
	Name       string
	Index      string
}

参数列表

type TplServiceDataList

type TplServiceDataList struct {
	PackageGo        string
	PackageJava      string
	BaseTypeList     []*TplBaseTypeData
	RequestList      []*TplMessageData
	VectorResList    []TplParam
	ServiceList      []TplBaseTypeData
	ConstructorList  []TplCRC32Info
	RequestCRC32List []TplCRC32Info
}

func GetProto

func GetProto(schemas []parser.MTProtoSchemas, outFilePath, packageName, protoType string) *TplServiceDataList

Jump to

Keyboard shortcuts

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