crd2go

package
v0.0.0-...-abac61d Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControllerGenCommand = "controller-gen"
)

Variables

This section is empty.

Functions

func CodeWriterAtPath

func CodeWriterAtPath(dir string) config.CodeWriterFunc

CodeWriterAtPath creates a file writer for the given CRD at the specified directory

func GenDeepCopyCode

func GenDeepCopyCode(cfg *config.Config) error

GenDeepCopyCode will call controller-gen to generate deep copy code In Auto mode controller-gen is only called if the program is in the $PATH

func Generate

func Generate(req *gotype.Request, r io.Reader) error

Generate will write files using the CodeWriterFunc

func GenerateStream

func GenerateStream(req *gotype.Request, r io.Reader) ([]string, error)

GenerateStream generates Go code from a stream of CRDs within a YAML reader. It uses the provided CodeWriterFunc to write the generated code to the specified output. The version parameter specifies the version of the CRD to generate code for. The preloadedTypes parameter allows for preloading specific types to avoid name collisions.

func GenerateToDir

func GenerateToDir(cfg *config.Config) error

GenerateToDir generates Go code from a CRD YAML file into a directory

func LoadConfig

func LoadConfig(r io.Reader) (*config.Config, error)

Types

This section is empty.

Directories

Path Synopsis
samples
v1

Jump to

Keyboard shortcuts

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