Documentation
¶
Index ¶
- Constants
- func ExecProtocPluginHandler(request *pluginpb.CodeGeneratorRequest, genFunc ProtocPluginHandler) (response *pluginpb.CodeGeneratorResponse, err error)
- func ExecProtocPluginRpc(request *pluginpb.CodeGeneratorRequest, genFunc ProtocPluginHandler) (response *pluginpb.CodeGeneratorResponse, err error)
- func ExtractFilename(filenameWithExt string) string
- func ProtoGeneratorMain(genFunc ProtocPluginHandler, in io.Reader, out io.Writer, logPrefix string) (request *pluginpb.CodeGeneratorRequest, ...)
- type ProtocPluginHandler
- type TProtocgenRpc
- func (this *TProtocgenRpc) CallBytes(request []byte, reply *TrpcReply) error
- func (this *TProtocgenRpc) CallReqRes(request *pluginpb.CodeGeneratorRequest) (response *pluginpb.CodeGeneratorResponse, err error)
- func (this *TProtocgenRpc) OnCallBytes(requestBytes []byte, rpcreply *TrpcReply) error
- func (this *TProtocgenRpc) OnCallReqRes(request *pluginpb.CodeGeneratorRequest) (response *pluginpb.CodeGeneratorResponse)
- func (this *TProtocgenRpc) Run()
- type TrpcReply
Constants ¶
View Source
const DefaultProtogenPort = 20000
Variables ¶
This section is empty.
Functions ¶
func ExecProtocPluginHandler ¶
func ExecProtocPluginHandler(request *pluginpb.CodeGeneratorRequest, genFunc ProtocPluginHandler) (response *pluginpb.CodeGeneratorResponse, err error)
func ExecProtocPluginRpc ¶
func ExecProtocPluginRpc(request *pluginpb.CodeGeneratorRequest, genFunc ProtocPluginHandler) (response *pluginpb.CodeGeneratorResponse, err error)
func ExtractFilename ¶
ExtractFilename filename.ext -> filename
func ProtoGeneratorMain ¶
func ProtoGeneratorMain(genFunc ProtocPluginHandler, in io.Reader, out io.Writer, logPrefix string) (request *pluginpb.CodeGeneratorRequest, response *pluginpb.CodeGeneratorResponse, err error)
ProtoGeneratorMain protobuf plugin from main
Types ¶
type ProtocPluginHandler ¶
type ProtocPluginHandler func(request *pluginpb.CodeGeneratorRequest) (genFiles []*pluginpb.CodeGeneratorResponse_File)
type TProtocgenRpc ¶
type TProtocgenRpc struct {
Handler ProtocPluginHandler
Port int
}
func (*TProtocgenRpc) CallBytes ¶
func (this *TProtocgenRpc) CallBytes(request []byte, reply *TrpcReply) error
func (*TProtocgenRpc) CallReqRes ¶
func (this *TProtocgenRpc) CallReqRes(request *pluginpb.CodeGeneratorRequest) (response *pluginpb.CodeGeneratorResponse, err error)
func (*TProtocgenRpc) OnCallBytes ¶
func (this *TProtocgenRpc) OnCallBytes(requestBytes []byte, rpcreply *TrpcReply) error
func (*TProtocgenRpc) OnCallReqRes ¶
func (this *TProtocgenRpc) OnCallReqRes(request *pluginpb.CodeGeneratorRequest) (response *pluginpb.CodeGeneratorResponse)
func (*TProtocgenRpc) Run ¶
func (this *TProtocgenRpc) Run()
Click to show internal directories.
Click to hide internal directories.