MCPcopy
hub / github.com/hwholiday/learning_tools / Plugin

Interface Plugin

grpc/protoc-gen-hw/generator/generator.go:37–49  ·  view source on GitHub ↗

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

35// A Plugin provides functionality to add to the output during Go code generation,
36// such as to produce RPC stubs.
37type Plugin interface {
38 // Name identifies the plugin.
39 Name() string
40 // Init is called once after data structures are built but before
41 // code generation begins.
42 Init(g *Generator)
43 // Generate produces the code generated by the plugin for this file,
44 // except for the imports, by calling the generator's methods P, In, and Out.
45 Generate(file *FileDescriptor)
46 // GenerateImports produces the import declarations for this file.
47 // It is called after Generate.
48 GenerateImports(file *FileDescriptor, imports map[GoImportPath]GoPackageName)
49}
50
51var plugins []Plugin
52

Callers 10

CommandLineParametersMethod · 0.65
TestHeapFunction · 0.65
mainFunction · 0.65
InitFunction · 0.65
InitFunction · 0.65
GenerateAllFilesMethod · 0.65
InitFunction · 0.65
mainFunction · 0.65
runPluginsMethod · 0.65
generateImportsMethod · 0.65

Implementers 1

Hwgrpc/protoc-gen-hw/plugin/hw/hw.go

Calls

no outgoing calls

Tested by

no test coverage detected