Documentation ¶
Overview ¶
Package parse is parsed proto file to struct
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSourceImportPkg ¶
GetSourceImportPkg get source import package
Types ¶
type PbService ¶
type PbService struct { Name string // Greeter LowerName string // greeter first character to lower ProtoName string // proto file name greeter.proto Methods []*ServiceMethod // service methods ImportPkgMap map[string]string // e.g. [userV1]:[userV1 "user/api/user/v1"] ProtoFileDir string // e.g. api/user/v1 ProtoPkgName string // e.g. userV1 ModuleName string }
PbService service fields
func GetServices ¶
GetServices parse protobuf services
type ServiceMethod ¶
type ServiceMethod struct { MethodName string // e.g. Create Request string // e.g. CreateRequest RequestFields []*Field // request fields Reply string // e.g. CreateReply ReplyFields []*Field Comment string // e.g. Create a record InvokeType int // 0:unary, 1: client-side streaming, 2: server-side streaming, 3: bidirectional streaming ServiceName string // Greeter LowerServiceName string // greeter first character to lower RequestImportPkgName string // e.g. userV1 ReplyImportPkgName string // e.g. userV1 ProtoPkgName string // e.g. userV1 }
ServiceMethod method fields
Click to show internal directories.
Click to hide internal directories.