Documentation ¶
Index ¶
- func ReadRequest() (*pluginpb.CodeGeneratorRequest, error)
- func RunPlugin(plugin string, req *pluginpb.CodeGeneratorRequest, stderr io.Writer) (*pluginpb.CodeGeneratorResponse, error)
- func StripParam(req *pluginpb.CodeGeneratorRequest, p string)
- func WriteResponse(w io.Writer, res *pluginpb.CodeGeneratorResponse) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadRequest ¶
func ReadRequest() (*pluginpb.CodeGeneratorRequest, error)
ReadRequest Unmarshal CodeGeneratorRequest.
func RunPlugin ¶
func RunPlugin(plugin string, req *pluginpb.CodeGeneratorRequest, stderr io.Writer) (*pluginpb.CodeGeneratorResponse, error)
RunPlugin runs a protoc plugin named "protoc-gen-$plugin" and returns the generated CodeGeneratorResponse or an error. Supply a non-nil stderr to override stderr on the called plugin.
func StripParam ¶
func StripParam(req *pluginpb.CodeGeneratorRequest, p string)
StripParam strips a named param from req.
func WriteResponse ¶
func WriteResponse(w io.Writer, res *pluginpb.CodeGeneratorResponse) error
WriteResponse marshals and writes CodeGeneratorResponse res to w.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.