Documentation ¶
Index ¶
- func CreateOrPatchObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) error
- func CreateOrPatchObjectByRef(ctx context.Context, c client.Client, ...) error
- func DeleteObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) error
- func DeleteObjectByRef(ctx context.Context, c client.Client, ...) error
- func GetObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) (map[string]interface{}, error)
- func GetObjectByRef(ctx context.Context, c client.Client, ...) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrPatchObject ¶
func CreateOrPatchObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, name, namespace string, content map[string]interface{}) error
CreateOrPatchObject creates or patches the object with the given GVK, name, and namespace using the given client. The object is created or patched with the given content, except for system metadata fields, namespace, and name. This function can be combined with runtime.DefaultUnstructuredConverter.ToUnstructured to create or update an object from runtime.RawExtension.
func CreateOrPatchObjectByRef ¶
func CreateOrPatchObjectByRef(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string, content map[string]interface{}) error
CreateOrPatchObjectByRef creates or patches the object with the given reference and namespace using the given client. The object is created or patched with the given content, except for system metadata fields. This function can be combined with runtime.DefaultUnstructuredConverter.ToUnstructured to create or update an object from runtime.RawExtension.
func DeleteObject ¶
func DeleteObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, name, namespace string) error
DeleteObject deletes the object with the given GVK, name, and namespace using the given client.
func DeleteObjectByRef ¶
func DeleteObjectByRef(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string) error
DeleteObjectByRef deletes the object with the given reference and namespace using the given client.
func GetObject ¶
func GetObject(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, name, namespace string) (map[string]interface{}, error)
GetObject returns the object with the given GVK, name, and namespace as a map using the given client. The full content of the object is returned as map[string]interface{}, except for system metadata fields. This function can be combined with runtime.DefaultUnstructuredConverter.FromUnstructured to get the object content as runtime.RawExtension.
func GetObjectByRef ¶
func GetObjectByRef(ctx context.Context, c client.Client, ref *autoscalingv1.CrossVersionObjectReference, namespace string) (map[string]interface{}, error)
GetObjectByRef returns the object with the given reference and namespace using the given client. The full content of the object is returned as map[string]interface{}, except for system metadata fields. This function can be combined with runtime.DefaultUnstructuredConverter.FromUnstructured to get the object content as runtime.RawExtension.
Types ¶
This section is empty.