kubeapi

package
v5.1.2-bit Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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

func (patch *JSON6902) Add(path ...string) func(value interface{}) *JSON6902

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) Bytes

func (patch JSON6902) Bytes() ([]byte, error)

Bytes returns the JSON representation of patch.

func (JSON6902) Data

func (patch JSON6902) Data(runtime.Object) ([]byte, error)

Data returns the JSON representation of patch.

func (JSON6902) IsEmpty

func (patch JSON6902) IsEmpty() bool

IsEmpty returns true when patch has no operations.

func (*JSON6902) Remove

func (patch *JSON6902) Remove(path ...string) *JSON6902

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.

func (*JSON6902) Replace

func (patch *JSON6902) Replace(path ...string) func(value interface{}) *JSON6902

Replace appends a "replace" operation to patch.

> The "replace" operation replaces the value at the target location > with a new value. > > The target location MUST exist for the operation to be successful.

func (JSON6902) Type

func (patch JSON6902) Type() types.PatchType

Type returns k8s.io/apimachinery/pkg/types.JSONPatchType.

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

func (patch *Merge7386) Add(path ...string) func(value interface{}) *Merge7386

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.

func (Merge7386) Bytes

func (patch Merge7386) Bytes() ([]byte, error)

Bytes returns the JSON representation of patch.

func (Merge7386) Data

func (patch Merge7386) Data(runtime.Object) ([]byte, error)

Data returns the JSON representation of patch.

func (Merge7386) IsEmpty

func (patch Merge7386) IsEmpty() bool

IsEmpty returns true when patch has no modifications.

func (*Merge7386) Remove

func (patch *Merge7386) Remove(path ...string) *Merge7386

Remove modifies patch to indicate that the member at path should be removed if it exists.

func (Merge7386) Type

func (patch Merge7386) Type() types.PatchType

Type returns k8s.io/apimachinery/pkg/types.MergePatchType.

Jump to

Keyboard shortcuts

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