clientgen

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// Name is the name of this client-set, e.g. "kubernetes"
	Name string `marker:",optional"`

	// ExternalOnly toggles the creation of a "versioned" sub-directory. Set to true if you are generating
	// custom code for a project that's not using k8s.io/code-generator/generate-groups.sh for their types.
	ExternalOnly bool `marker:",optional"`

	// Standalone toggles the creation of a "cluster" sub-directory. Set to true if you are placing cluster-
	// aware code somewhere outside of the normal client tree.
	Standalone bool `marker:",optional"`

	// HeaderFile specifies the header text (e.g. license) to prepend to generated files.
	HeaderFile string `marker:",optional"`

	// Year specifies the year to substitute for " YEAR" in the header file.
	Year string `marker:",optional"`

	// SingleClusterClientPackagePath is the root directory under which single-cluster-aware clients exist.
	// e.g. "k8s.io/client-go/kubernetes"
	SingleClusterClientPackagePath string `marker:""`

	// SingleClusterApplyConfigurationsPackagePath is the root directory under which single-cluster-aware apply configurations exist.
	// e.g. "k8s.io/client-go/applyconfigurations"
	SingleClusterApplyConfigurationsPackagePath string `marker:",optional"`

	// OutputPackagePath is the root directory under which this tool will output files.
	// e.g. "github.com/kcp-dev/client-go/clients"
	OutputPackagePath string `marker:""`

	// APIPackagePath is the root directory under which API types exist.
	// e.g. "k8s.io/api"
	APIPackagePath string `marker:"apiPackagePath"`
}

func (Generator) Generate

func (g Generator) Generate(ctx *genall.GenerationContext) error

Generate will generate clients for all types that have generated clients.

func (Generator) RegisterMarkers

func (Generator) RegisterMarkers(into *markers.Registry) error

Jump to

Keyboard shortcuts

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