generic

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(metav1.Object)

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

func WithAnnotationsPopulated

func WithAnnotationsPopulated() Option

WithAnnotationsPopulated ensures that object.Annotations is not nil.

func WithControllerOwnerReference

func WithControllerOwnerReference(owner metav1.Object) Option

WithControllerOwnerReference sets the owner reference to the supplied object.

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 WithResourceVersion added in v1.0.2

func WithResourceVersion(resourceVersion string) Option

WithResourceVersion sets the specified resource version on the supplied object.

func WithUID added in v1.0.3

func WithUID(uid string) Option

WithUID sets the Metadata UID on the supplied object.

Jump to

Keyboard shortcuts

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