Documentation ¶
Index ¶
- type JSON6902
- func (patch *JSON6902) Add(path ...string) func(value interface{}) *JSON6902
- func (patch JSON6902) Bytes() ([]byte, error)
- func (patch JSON6902) Data(runtime.Object) ([]byte, error)
- func (patch JSON6902) IsEmpty() bool
- func (patch *JSON6902) Remove(path ...string) *JSON6902
- func (patch *JSON6902) Replace(path ...string) func(value interface{}) *JSON6902
- func (patch JSON6902) Type() types.PatchType
- type Merge7386
- func (patch *Merge7386) Add(path ...string) func(value interface{}) *Merge7386
- func (patch Merge7386) Bytes() ([]byte, error)
- func (patch Merge7386) Data(runtime.Object) ([]byte, error)
- func (patch Merge7386) IsEmpty() bool
- func (patch *Merge7386) Remove(path ...string) *Merge7386
- func (patch Merge7386) Type() types.PatchType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSON6902 ¶
type JSON6902 []interface{}
JSON6902 represents a JSON Patch according to RFC 6902; the same as k8s.io/apimachinery/pkg/types.JSONPatchType.
func NewJSONPatch ¶
func NewJSONPatch() *JSON6902
NewJSONPatch creates a new JSON Patch according to RFC 6902; the same as k8s.io/apimachinery/pkg/types.JSONPatchType.
func (*JSON6902) Add ¶
Add appends an "add" operation to patch.
> The "add" operation performs one of the following functions, > depending upon what the target location references: > > o If the target location specifies an array index, a new value is > inserted into the array at the specified index. > > o If the target location specifies an object member that does not > already exist, a new member is added to the object. > > o If the target location specifies an object member that does exist, > that member's value is replaced.
func (*JSON6902) Remove ¶
Remove appends a "remove" operation to patch.
> The "remove" operation removes the value at the target location. > > The target location MUST exist for the operation to be successful.
type Merge7386 ¶
type Merge7386 map[string]interface{}
Merge7386 represents a JSON Merge Patch according to RFC 7386; the same as k8s.io/apimachinery/pkg/types.MergePatchType.
func NewMergePatch ¶
func NewMergePatch() *Merge7386
NewMergePatch creates a new JSON Merge Patch according to RFC 7386; the same as k8s.io/apimachinery/pkg/types.MergePatchType.
func (*Merge7386) Add ¶
Add modifies patch to indicate that the member at path should be added or replaced with value.
> If the provided merge patch contains members that do not appear > within the target, those members are added. If the target does > contain the member, the value is replaced. Null values in the merge > patch are given special meaning to indicate the removal of existing > values in the target.