Documentation ¶
Overview ¶
Package deepcopy generates DeepCopy, DeepCopyInto, and DeepCopyObject implementations for types.
It's ported from k8s.io/code-generator's / k8s.io/gengo's deepcopy-gen, but it's scoped specifically to runtime.Object and skips support for deepcopying interfaces, which aren't handled in CRDs anyway.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct { // 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"` }
Generator generates code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
func (Generator) CheckFilter ¶
func (Generator) CheckFilter() loader.NodeFilter
func (Generator) Help ¶
func (Generator) Help() *markers.DefinitionHelp
type ObjectGenCtx ¶
type ObjectGenCtx struct { Collector *markers.Collector Checker *loader.TypeChecker HeaderText string }
ObjectGenCtx contains the common info for generating deepcopy implementations. It mostly exists so that generating for a package can be easily tested without requiring a full set of output rules, etc.
Click to show internal directories.
Click to hide internal directories.