Documentation
¶
Index ¶
Constants ¶
View Source
const (
SkipMockGen = "SKIP_MOCK_GEN"
)
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(opts GenerateOptions) error
Types ¶
type DocsOptions ¶
type DocsOptions = options.DocsOptions
type GenerateOptions ¶
type GenerateOptions struct {
// Root of files to be compiled (will default to "." if not set)
RelativeRoot string
// // Root of package, necessary to find vendor (will default to $(go env GOMOD) if not set)
// ProjectRoot string
// compile protos found in project directories (dirs with solo-kit.json) and their subdirs
CompileProtos bool
// compile protos found in these directories. can also point directly to .proto files
CustomCompileProtos []string
// custom plugins
// each will append a <plugin>_out= directive to protoc command
CustomPlugins []string
GenDocs *DocsOptions
CustomImports []string
SkipDirs []string
// arguments for go_out=
CustomGoOutArgs []string
// skip generated mocks
SkipGenMocks bool
// skip generated tests
SkipGeneratedTests bool
/*
Represents the go package which this package would have been in the GOPATH
This allows it to be able to maintain compatibility with the old solo-kit
default: current github.com/solo-io/<current-folder>
for example: github.com/solo-io/solo-kit
*/
PackageName string
// config for anyvendor
ExternalImports *sk_anyvendor.Imports
ValidationSchemaOptions *schemagen.ValidationSchemaOptions
}
type Runner ¶ added in v0.12.0
type Runner struct {
Opts GenerateOptions
// Relative root of solo-kit gen. Will be used as the root of all generation
RelativeRoot string
// Location to output all proto code gen, defaults to a temp dir
DescriptorOutDir string
// root of the go mod package
BaseDir string
// common import directories in which solo-kit should look for protos in the current package
CommonImports []string
}
Click to show internal directories.
Click to hide internal directories.