Documentation ¶
Index ¶
- func ConvertPatchToObject(fromMap map[string]interface{}, toObj client.Object) error
- func JoinPath(root, next string) string
- func Value[T any](path string, patches ...Patch) (T, bool)
- type Patch
- func (p Patch) Apply(obj client.Object) error
- func (p Patch) Clear()
- func (p Patch) DeepCopy() Patch
- func (p Patch) Delete(path string)
- func (p Patch) DeleteAllExcept(path string, except ...string)
- func (p Patch) Has(path string) bool
- func (p Patch) IsEmpty() bool
- func (p Patch) MustTranslate(path string, translate func(path string, val interface{}) (interface{}, error))
- func (p Patch) Set(path string, value interface{})
- func (p Patch) String(path string) (string, bool)
- func (p Patch) Translate(path string, translate func(path string, val interface{}) (interface{}, error)) error
- func (p Patch) Value(path string) (interface{}, bool)
- type PathValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPatchToObject ¶
Types ¶
type Patch ¶
type Patch map[string]interface{}
Patch helps with navigating generic map[string]interface{} which is used by unstructured objects. It's called patch, because we only operate on patches from virtual to host and back and these functions help to keep it as generic as possible.
func CalculateMergePatch ¶
func (Patch) DeleteAllExcept ¶
func (Patch) MustTranslate ¶
func (Patch) Set ¶
Set sets a value and will create objects along the way. Wildcard paths are not supported here.
Click to show internal directories.
Click to hide internal directories.