flag

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateFlags

func ValidateFlags(f Flags) error

ValidateFlags checks if the inputs provided through flags are valid and if so, sets defaults. TODO: Remove this and bind options to all the generators, see https://github.com/kcp-dev/code-generator/issues/4

Types

type Flags

type Flags struct {
	// OutputDir is where the generated code is to be written to.
	OutputDir string
	// InputDir is path to the input APIs (types.go)
	InputDir string
	// ClientsetAPIPath is the path to where client sets are scaffolded by codegen.
	ClientsetAPIPath string
	// InformersPackage is the path to where informers are scaffolded by codegen. Only used for generating upstream-interface compatible informers.
	InformersPackage string
	// InformersInternalInterfacesPackage is the path to where the interfaces for informers are scaffolded by codegen. Only used for generating upstream-interface compatible informers.
	InformersInternalInterfacesPackage string
	// ListersPackage is the path to where listers are scaffolded by codegen. Only used for generating upstream-interface compatible listers.
	ListersPackage string
	// optional package of apply configurations, generated by applyconfiguration-gen, that are required to generate Apply functions for each type in the clientset.
	// By default Apply functions are not generated. If this is provided, then wrappers for Apply functions will be generated.
	ApplyConfigurationPackage string
	// List of group versions for which the wrappers are to be generated.
	GroupVersions []string
	// Path to the headerfile.
	GoHeaderFilePath string
}

Flags are options accepted by the generator.

func (*Flags) AddTo

func (f *Flags) AddTo(flagset *pflag.FlagSet)

Jump to

Keyboard shortcuts

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