-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from gengo/fix/golint
Add abstraction of code generator implementation
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Package generator provides an abstract interface to code generators. | ||
package generator | ||
|
||
import ( | ||
"github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway/descriptor" | ||
plugin "github.com/golang/protobuf/protoc-gen-go/plugin" | ||
) | ||
|
||
// 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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters