json_patch

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPatch

func ApplyPatch(jsonDoc any, patch []PatchOperation) ([]byte, error)

func TestApplyPatch

func TestApplyPatch(t *testing.T)

Types

type PatchOperation

type PatchOperation struct {
	Op   string `json:"op"`
	Path string `json:"path"`
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	Value json.RawMessage `json:"value,omitempty"`
}

func (*PatchOperation) DeepCopy

func (in *PatchOperation) DeepCopy() *PatchOperation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchOperation.

func (*PatchOperation) DeepCopyInto

func (in *PatchOperation) DeepCopyInto(out *PatchOperation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL