objectpatch

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOperation

type CreateOperation string
const (
	Create            CreateOperation = "Create"
	CreateOrUpdate    CreateOperation = "CreateOrUpdate"
	CreateIfNotExists CreateOperation = "CreateIfNotExists"
)

type DeleteOperation

type DeleteOperation string
const (
	// DeletePropagationForeground
	Delete DeleteOperation = "Delete"
	// DeletePropagationBackground
	DeleteInBackground DeleteOperation = "DeleteInBackground"
	// DeletePropagationOrphan
	DeleteNonCascading DeleteOperation = "DeleteNonCascading"
)

type ObjectPatchCollector

type ObjectPatchCollector struct {
	// contains filtered or unexported fields
}

func NewObjectPatchCollector

func NewObjectPatchCollector(logger *log.Logger) *ObjectPatchCollector

func (*ObjectPatchCollector) Create

func (c *ObjectPatchCollector) Create(obj any)

func (*ObjectPatchCollector) CreateIfNotExists

func (c *ObjectPatchCollector) CreateIfNotExists(obj any)

func (*ObjectPatchCollector) CreateOrUpdate

func (c *ObjectPatchCollector) CreateOrUpdate(obj any)

func (*ObjectPatchCollector) Delete

func (c *ObjectPatchCollector) Delete(apiVersion string, kind string, namespace string, name string)

func (*ObjectPatchCollector) DeleteInBackground

func (c *ObjectPatchCollector) DeleteInBackground(apiVersion string, kind string, namespace string, name string)

func (*ObjectPatchCollector) DeleteNonCascading

func (c *ObjectPatchCollector) DeleteNonCascading(apiVersion string, kind string, namespace string, name string)

func (*ObjectPatchCollector) JQFilter

func (c *ObjectPatchCollector) JQFilter(filter string, apiVersion string, kind string, namespace string, name string, opts ...pkg.PatchCollectorOption)

func (*ObjectPatchCollector) JSONPatch

func (c *ObjectPatchCollector) JSONPatch(patch any, apiVersion string, kind string, namespace string, name string, opts ...pkg.PatchCollectorOption)

func (*ObjectPatchCollector) MergePatch

func (c *ObjectPatchCollector) MergePatch(patch any, apiVersion string, kind string, namespace string, name string, opts ...pkg.PatchCollectorOption)

func (*ObjectPatchCollector) Operations

Operations returns all collected operations

func (*ObjectPatchCollector) PatchWithJQ

func (c *ObjectPatchCollector) PatchWithJQ(jqfilter string, apiVersion string, kind string, namespace string, name string, opts ...pkg.PatchCollectorOption)

func (*ObjectPatchCollector) PatchWithJSON

func (c *ObjectPatchCollector) PatchWithJSON(jsonPatch any, apiVersion string, kind string, namespace string, name string, opts ...pkg.PatchCollectorOption)

func (*ObjectPatchCollector) PatchWithMerge

func (c *ObjectPatchCollector) PatchWithMerge(mergePatch any, apiVersion string, kind string, namespace string, name string, opts ...pkg.PatchCollectorOption)

func (*ObjectPatchCollector) WriteOutput

func (c *ObjectPatchCollector) WriteOutput(w io.Writer) error

type Patch

type Patch struct {
	// contains filtered or unexported fields
}

func (*Patch) Description

func (p *Patch) Description() string

func (*Patch) WithIgnoreHookError

func (p *Patch) WithIgnoreHookError(ignore bool)

func (*Patch) WithIgnoreMissingObject

func (p *Patch) WithIgnoreMissingObject(ignore bool)

func (*Patch) WithSubresource

func (p *Patch) WithSubresource(subresource string)

type PatchOperation

type PatchOperation string
const (
	MergePatch PatchOperation = "MergePatch"
	JQPatch    PatchOperation = "JQPatch"
	JSONPatch  PatchOperation = "JSONPatch"
)

type Snapshot

type Snapshot json.RawMessage

func (Snapshot) String

func (snap Snapshot) String() string

func (Snapshot) UnmarshalTo

func (snap Snapshot) UnmarshalTo(v any) error

type Snapshots

type Snapshots map[string][]pkg.Snapshot

inside json.RawMessage is array of json objects

func (Snapshots) Get

func (s Snapshots) Get(key string) []pkg.Snapshot

Jump to

Keyboard shortcuts

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