Documentation
¶
Index ¶
- type Option
- func WithAnnotation(key, value string) Option
- func WithAnnotationsPopulated() Option
- func WithControllerOwnerReference(owner metav1.Object) Option
- func WithFinalizer(finalizer string) Option
- func WithIncrementedResourceVersion() Option
- func WithLabel(key, value string) Option
- func WithName(name string) Option
- func WithNamePostfix(postfix string) Option
- func WithNamespace(namespace string) Option
- func WithResourceVersion(resourceVersion string) Option
- func WithTypeMeta(typers ...runtime.ObjectTyper) Option
- func WithUID(uid string) Option
- func WithoutFinalizer(finalizer string) Option
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 WithAnnotation ¶ added in v1.0.5
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 ¶
WithControllerOwnerReference sets the owner reference to the supplied object.
func WithFinalizer ¶ added in v1.0.5
WithFinalizer adds the specified finalizer to the 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 WithNamePostfix ¶
WithNamePostfix appends the string passed in to the object.Name field when building an with Build.
func WithNamespace ¶
WithNamespace sets the object.Namespace field when building an object with Build.
func WithResourceVersion ¶ added in v1.0.2
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 WithoutFinalizer ¶ added in v1.0.5
WithoutFinalizer removes the specified finalizer from the object.