cmd

package
v0.36.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 29 Imported by: 8

Documentation

Index

Constants

View Source
const (
	SkipMockGen = "SKIP_MOCK_GEN"
)

Variables

This section is empty.

Functions

func Generate

func Generate(opts GenerateOptions) error

func Run

func Run(relativeRoot string, compileProtos bool, genDocs *DocsOptions, customImports, skipDirs []string) 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 RunFunc added in v0.12.0

type RunFunc func() error

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
}

func (*Runner) Run added in v0.12.0

func (r *Runner) Run() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL