MCPcopy
hub / github.com/golang/protobuf / Plugin

Interface Plugin

protoc-gen-go/generator/generator.go:57–69  ·  protoc-gen-go/generator/generator.go::Plugin

A Plugin provides functionality to add to the output during Go code generation, such as to produce RPC stubs.

Source from the content-addressed store, hash-verified

55// A Plugin provides functionality to add to the output during Go code generation,
56// such as to produce RPC stubs.
57type Plugin interface {
58 // Name identifies the plugin.
59 Name() string
60 // Init is called once after data structures are built but before
61 // code generation begins.
62 Init(g *Generator)
63 // Generate produces the code generated by the plugin for this file,
64 // except for the imports, by calling the generator's methods P, In, and Out.
65 Generate(file *FileDescriptor)
66 // GenerateImports produces the import declarations for this file.
67 // It is called after Generate.
68 GenerateImports(file *FileDescriptor)
69}
70
71var plugins []Plugin
72

Callers 14

TestGetExtensionDefaultsFunction · 0.65
unmarshalMessageMethod · 0.65
writeNameMethod · 0.65
writeSingularValueMethod · 0.65
EnumValueMapFunction · 0.65
genServiceFunction · 0.65
InitMethod · 0.65
newPropertiesFunction · 0.65
GenerateAllFilesMethod · 0.65
tokenizeFunction · 0.65

Implementers 1

grpcprotoc-gen-go/grpc/grpc.go

Calls

no outgoing calls

Tested by

no test coverage detected