generator.go 392 B

123456789101112
  1. // Package generator provides an abstract interface to code generators.
  2. package generator
  3. import (
  4. plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
  5. )
  6. // Generator is an abstraction of code generators.
  7. type Generator interface {
  8. // Generate generates output files from input .proto files.
  9. Generate(req *plugin.CodeGeneratorRequest) ([]*plugin.CodeGeneratorResponse_File, error)
  10. }