common_test

package
v0.0.0-...-34451c6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: AGPL-3.0, Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsGroupResource

func AsGroupResource(groupName string, obj runtime.Object) schema.GroupResource

func MaybeCreate

func MaybeCreate[O client.Object](c client.Client, object O, patch Patcher[O]) error

func MaybePatch

func MaybePatch[O client.Object](c client.Client, object O, patch Patcher[O]) error

func MaybePatchObject

func MaybePatchObject[O client.Object](c client.Client, object O, patch Patcher[O]) error

func SanitizeStatusConditions

func SanitizeStatusConditions(status v1alpha1.Status) v1alpha1.Status

Types

type Generator

type Generator interface {
	WithPrefix(prefix string, length int) string
	Random(length int) string
}

func StringGenerator

func StringGenerator() Generator

type Patcher

type Patcher[PatchObject client.Object] func(object PatchObject)

Jump to

Keyboard shortcuts

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