Documentation ¶
Index ¶
- Variables
- func NewCollector(customImports, commonImports []string) *collector
- func NewProtoCompiler(collector Collector, customImports, customGoArgs, customPlugins []string, ...) *protoCompiler
- type Collector
- type DescriptorWithPath
- type ImportsExtractor
- type ImportsFetcher
- type ProtoCompiler
- type ProtocOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FetchImportsTimeout = func(filename string) error { return eris.Errorf("Timed out while fetching imports for proto file: [%s]", filename) } )
Functions ¶
func NewCollector ¶
func NewCollector(customImports, commonImports []string) *collector
func NewProtoCompiler ¶
Types ¶
type DescriptorWithPath ¶
type DescriptorWithPath struct { *descriptor.FileDescriptorProto // path to the file ProtoFilePath string // the set of imports this file requires Imports []string }
func (*DescriptorWithPath) GetMessage ¶
func (file *DescriptorWithPath) GetMessage(typeName string) *descriptor.DescriptorProto
type ImportsExtractor ¶
type ImportsExtractor interface {
FetchImportsForFile(protoFile string, importsFetcher ImportsFetcher) ([]string, error)
}
func NewSynchronizedImportsExtractor ¶
func NewSynchronizedImportsExtractor() ImportsExtractor
type ImportsFetcher ¶
type ProtoCompiler ¶
type ProtoCompiler interface {
CompileDescriptorsFromRoot(root string, skipDirs []string) ([]*DescriptorWithPath, error)
}
type ProtocOptions ¶
type ProtocOptions struct { // declare mappings from proto files to full import paths of the corresponding generated Go code // used when the source proto files don't define `go_package` GoPackage map[string]string // Additional custom protoc imports CustomImports []string // Skip compiling these directories SkipDirs []string // Extra flags to provide to invocations of protoc ProtocExtraFlags []string }
Click to show internal directories.
Click to hide internal directories.