Documentation
¶
Index ¶
- Variables
- func FromObject(ro runtime.Object) (*apiv2.StepObject, error)
- func Patch(input *apiv2.StepObject, with *apiv2.StepObject, opts ...PatchOption) error
- func SetNamespace(ro runtime.Object, namespace string) error
- func ToObject(so *apiv2.StepObject) (o runtime.Object, gvk *schema.GroupVersionKind, err error)
- func ToStructuredObject(obj runtime.Object) runtime.Object
- func ToUnstructuredObject(so *apiv2.StepObject) (*unstructured.Unstructured, *schema.GroupVersionKind, error)
- type PatchMeta
- type PatchOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidObject is returned for invalid object ErrInvalidObject = errors.New("object interface not implemented") )
Functions ¶
func FromObject ¶
func FromObject(ro runtime.Object) (*apiv2.StepObject, error)
FromObject creates step object from runtime object
func Patch ¶
func Patch(input *apiv2.StepObject, with *apiv2.StepObject, opts ...PatchOption) error
Patch patches the step object with give step object
func SetNamespace ¶
SetNamespace sets namespace for runtime object
func ToObject ¶
func ToObject(so *apiv2.StepObject) (o runtime.Object, gvk *schema.GroupVersionKind, err error)
ToObject converts step object to runtime object
func ToStructuredObject ¶
ToStructuredObject converts unstructured object to structured object
func ToUnstructuredObject ¶
func ToUnstructuredObject(so *apiv2.StepObject) (*unstructured.Unstructured, *schema.GroupVersionKind, error)
ToUnstructuredObject converts step object to unstructured object, this is useful for preserving original json serialized input in step object. Note: while patching k8s resources, we should preserve the user input, as patching can remove fields; which are represented as null values in the patch
Types ¶
type PatchOption ¶
type PatchOption func(*PatchMeta)
PatchOption is the functional patch option
func AddAnnotations ¶
func AddAnnotations(annotations map[string]string) PatchOption
AddAnnotations adds annotations to object
Click to show internal directories.
Click to hide internal directories.