Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | // Package generator provides an abstract interface to code generators. |
| 2 | package generator |
| 3 | |
| 4 | import ( |
| 5 | plugin "github.com/golang/protobuf/protoc-gen-go/plugin" |
| 6 | "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor" |
| 7 | ) |
| 8 | |
| 9 | // Generator is an abstraction of code generators. |
| 10 | type Generator interface { |
| 11 | // Generate generates output files from input .proto files. |
| 12 | Generate(targets []*descriptor.File) ([]*plugin.CodeGeneratorResponse_File, error) |
| 13 | } |