Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler provides a way to generate file descriptors from a Protocol Buffers file without relying on protoc command. This allows you to do things like validate proto files without relying on protoc.
type CompilerError ¶
type CompilerError struct { Err error ErrWithPos []reporter.ErrorWithPos }
CompilerError has error with source position.
func (*CompilerError) Error ¶
func (e *CompilerError) Error() string
type Option ¶
type Option func(*Compiler)
Option represents compiler option.
func ImportPathOption ¶
ImportPathOption used to add a path to reference a proto file. By default, only the directory where the starting file exists is added to the import path.
func ManualImportOption ¶ added in v0.3.3
func ManualImportOption() Option
ManualImportOption stops importing `grpc/federation/federation.proto` file and its dependencies By default if `grpc/federation/federation.proto` file and its dependencies do not exist, automatically imports it. The version of the proto file is the same as the version when the compiler is built.