1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-30 00:32:21 +00:00
2018-12-15 00:26:58 +08:00

14 lines
463 B
Go
Executable File

// Package generator provides an abstract interface to code generators.
package generator
import (
plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
"github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway/descriptor"
)
// Generator is an abstraction of code generators.
type Generator interface {
// Generate generates output files from input .proto files.
Generate(targets []*descriptor.File) ([]*plugin.CodeGeneratorResponse_File, error)
}