Documentation
¶
Index ¶
- type Option
- func Deleted() Option
- func WithAnnotation(key, value string) Option
- func WithAnnotationsPopulated() Option
- func WithControllerOwnerReference(owner metav1.Object) Option
- func WithCreationTimestamp(time time.Time) Option
- func WithFinalizer(finalizer string) Option
- func WithGeneration(generation int64) 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 WithOwnerReference(owner hivev1.MetaRuntimeObject) 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 Deleted ¶ added in v1.0.6
func Deleted() Option
Deleted sets a deletion timestamp on the object.
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 controller owner reference to the supplied object.
func WithCreationTimestamp ¶ added in v1.0.6
WithCreationTimestamp sets the creation timestamp on the object.
func WithFinalizer ¶ added in v1.0.5
WithFinalizer adds the specified finalizer to the object.
func WithGeneration ¶ added in v1.0.9
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 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
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.