utilconversion

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AnnotationKey = "vmoperator.vmware.com/conversion"

AnnotationKey is the annotation key to ensure lossless conversion of objects between API versions.

Variables

This section is empty.

Functions

func GetFuzzer

func GetFuzzer(scheme *runtime.Scheme, funcs ...fuzzer.FuzzerFuncs) *fuzz.Fuzzer

GetFuzzer returns a new fuzzer to be used for testing.

func HubSpokeHub added in v1.8.6

func HubSpokeHub(input FuzzTestFuncInput)

func MarshalData added in v1.8.5

func MarshalData(src metav1.Object, dst metav1.Object) error

MarshalData stores the source object as json data in the destination object annotations map. It ignores the metadata of the source object.

func SpokeHubSpoke added in v1.8.6

func SpokeHubSpoke(input FuzzTestFuncInput)

func UnmarshalData added in v1.8.5

func UnmarshalData(from metav1.Object, to interface{}) (bool, error)

UnmarshalData tries to retrieve the data from the annotation and unmarshals it into the object passed as input.

Types

type FuzzTestFuncInput

type FuzzTestFuncInput struct {
	Scheme *runtime.Scheme

	Hub              conversion.Hub
	HubAfterMutation func(conversion.Hub)

	Spoke                      conversion.Convertible
	SpokeAfterMutation         func(convertible conversion.Convertible)
	SkipSpokeAnnotationCleanup bool

	FuzzerFuncs []fuzzer.FuzzerFuncs
}

FuzzTestFuncInput contains input parameters for the FuzzTestFunc function.

Jump to

Keyboard shortcuts

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