Documentation
¶
Index ¶
- func AddFinalizerPatch(obj metav1.Object, finalizers ...string) client.Patch
- func FixPathToValid(path string) string
- func RemoveFinalizerPatch(obj metav1.Object, finalizers ...string) client.Patch
- type JSONPatch
- func (jp *JSONPatch) Append(op JSONPatchOperation, path string, val interface{}) *JSONPatch
- func (jp *JSONPatch) Join(patch JSONPatch)
- func (jp *JSONPatch) JsonPatch() (client.Patch, error)
- func (jp JSONPatch) Len() int32
- func (jp *JSONPatch) Marshal() ([]byte, error)
- func (jp *JSONPatch) ToClientPatch() (client.Patch, error)
- type JSONPatchItem
- type JSONPatchOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFinalizerPatch ¶
func FixPathToValid ¶
Types ¶
type JSONPatch ¶
type JSONPatch []JSONPatchItem
func NewJSONPatch ¶
func NewJSONPatch(items ...JSONPatchItem) *JSONPatch
type JSONPatchItem ¶
type JSONPatchItem struct { Operation JSONPatchOperation `json:"op"` Path string `json:"path"` Value interface{} `json:"value"` }
type JSONPatchOperation ¶
type JSONPatchOperation string
const ( // If the target location specifies an object member that does exist, that member's value is replaced. Add JSONPatchOperation = "add" // The target location MUST exist for the operation to be successful. Replace JSONPatchOperation = "replace" // The target location MUST exist for the operation to be successful. Remove JSONPatchOperation = "remove" Move JSONPatchOperation = "move" Copy JSONPatchOperation = "copy" PathSeparator = "/" )
Click to show internal directories.
Click to hide internal directories.