generic

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(hivev1.MetaRuntimeObject)

Option defines a function signature for any function that wants to be passed into Build

func Deleted added in v1.0.6

func Deleted() Option

Deleted sets a deletion timestamp on the object.

func WithAnnotation added in v1.0.5

func WithAnnotation(key, value string) Option

WithAnnotation adds an annotation with the specified key and value to the supplied object. If there is already an annotation with the specified key, it will be replaced.

func WithAnnotationsPopulated

func WithAnnotationsPopulated() Option

WithAnnotationsPopulated ensures that object.Annotations is not nil.

func WithControllerOwnerReference

func WithControllerOwnerReference(owner metav1.Object) Option

WithControllerOwnerReference sets the controller owner reference to the supplied object.

func WithCreationTimestamp added in v1.0.6

func WithCreationTimestamp(time time.Time) Option

WithCreationTimestamp sets the creation timestamp on the object.

func WithFinalizer added in v1.0.5

func WithFinalizer(finalizer string) Option

WithFinalizer adds the specified finalizer to the object.

func WithGeneration added in v1.0.9

func WithGeneration(generation int64) Option

func WithIncrementedResourceVersion added in v1.0.2

func WithIncrementedResourceVersion() Option

WithIncrementedResourceVersion increments by one the resource version on the supplied object. If the resource version is not an integer, then the new resource version will be set to 1.

func WithLabel

func WithLabel(key, value string) Option

WithLabel sets the specified label on the supplied object.

func WithName

func WithName(name string) Option

WithName sets the object.Name field when building an object with Build.

func WithNamePostfix

func WithNamePostfix(postfix string) Option

WithNamePostfix appends the string passed in to the object.Name field when building an with Build.

func WithNamespace

func WithNamespace(namespace string) Option

WithNamespace sets the object.Namespace field when building an object with Build.

func WithOwnerReference added in v1.0.6

func WithOwnerReference(owner hivev1.MetaRuntimeObject) Option

WithOwnerReference sets the owner reference to the supplied object. BlockOwnerDeletion is set to true

func WithResourceVersion added in v1.0.2

func WithResourceVersion(resourceVersion string) Option

WithResourceVersion sets the specified resource version on the supplied object.

func WithTypeMeta added in v1.0.5

func WithTypeMeta(typers ...runtime.ObjectTyper) Option

WithTypeMeta populates the type meta for the object.

func WithUID added in v1.0.3

func WithUID(uid string) Option

WithUID sets the Metadata UID on the supplied object.

func WithoutFinalizer added in v1.0.5

func WithoutFinalizer(finalizer string) Option

WithoutFinalizer removes the specified finalizer from the object.

Jump to

Keyboard shortcuts

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