Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckOrDownloadProtoc ¶
CheckOrDownloadProtoc downloads protoc to the specified path, unless it's already been downloaded. If no path is provided, it uses an OS-appropriate user cache. If the version is not specified, the latest version is fetched from GitHub. If both version and path are specified and a file already exists at the path, it checks whether the output of `protoc --version` is an exact match.
func FileDescriptorSet ¶
func FileDescriptorSet(dir string, args ...string) (*desc.FileDescriptorSet, error)
FileDescriptorSet will load a single Gunk package, and return the proto FileDescriptor set of the Gunk package.
Currently, we only generate a FileDescriptorSet for one Gunk package.
Types ¶
type Generator ¶
func (*Generator) GeneratePkg ¶
GeneratePkg runs the proto files resulting from translating gunk packages through a code generator, such as protoc-gen-go to generate Go packages.
Generated files are written to the same directory, next to the source gunk files.
It is fine to pass the plugin.CodeGeneratorRequest to every protoc generator unaltered; this is what protoc does when calling out to the generators and the generators should already handle the case where they have nothing to do.