Documentation
¶
Overview ¶
Package generator provides tools for generating clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoProcessing = errors.New("there are not files to regenerate")
Functions ¶
Types ¶
type Config ¶
type Config struct { GoogleapisDir string GenprotoDir string ProtoDir string LocalMode bool RegenOnly bool ForceAll bool GenAlias bool }
Config contains inputs needed to generate sources.
type GenprotoGenerator ¶
type GenprotoGenerator struct {
// contains filtered or unexported fields
}
GenprotoGenerator is used to generate code for googleapis/go-genproto.
func NewGenprotoGenerator ¶
func NewGenprotoGenerator(c *Config) *GenprotoGenerator
NewGenprotoGenerator creates a new GenprotoGenerator.
func (*GenprotoGenerator) Regen ¶
func (g *GenprotoGenerator) Regen(ctx context.Context) error
Regen regenerates the genproto repository. regenGenproto regenerates the genproto repository.
regenGenproto recursively walks through each directory named by given arguments, looking for all .proto files. (Symlinks are not followed.) Any proto file without `go_package` option or whose option does not begin with the genproto prefix is ignored.
If multiple roots contain files with the same name, eg "root1/path/to/file" and "root2/path/to/file", only the first file is processed; the rest are ignored.
Protoc is executed on remaining files, one invocation per set of files declaring the same Go package.