args

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckType

func CheckType(passedType *types.Type)

func ObjectsToGroupVersion

func ObjectsToGroupVersion(group string, objs []interface{}, ret map[schema.GroupVersion][]*types.Name) error

Types

type CustomArgs

type CustomArgs struct {
	// Package is the directory path where generated code output will be located
	Package       string
	ImportPackage string
	TypesByGroup  map[schema.GroupVersion][]*types.Name
	Options       Options
	OutputBase    string
	// BoilerplateContent is the actual boilerplate content that has been
	// read. It will be added to every generated files.
	BoilerplateContent []byte
}

type Group

type Group struct {
	// Types is a slice of the following types
	// Instance of any struct: used for reflection to describe the type
	// string: a directory that will be listed (non-recursively) for types
	// Type: a description of a type
	Types         []interface{}
	GenerateTypes bool
	// Generate clientsets
	GenerateClients             bool
	OutputControllerPackageName string
	// Generate listers
	GenerateListers bool
	// Generate informers
	GenerateInformers bool
	// The package name of the API types
	PackageName string
}

type Options

type Options struct {
	ImportPackage string
	// OutputPackage is the directory path where generated code output will be located
	OutputPackage string
	Groups        map[string]Group
	// Boilerplate is the filepath to a boilerplate file whose content will
	// be added to every generated files.
	Boilerplate string
}

type Type

type Type struct {
	Version string
	Package string
	Name    string
}

func ScanDirectory

func ScanDirectory(pkgPath string) (result []Type, err error)

Jump to

Keyboard shortcuts

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