patchablevalues

package
v0.3.5 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: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PatchableValues

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

func NewPatchableValues

func NewPatchableValues(values map[string]any) (*PatchableValues, error)

func (*PatchableValues) ArrayCount

func (p *PatchableValues) ArrayCount(path string) (int, error)

ArrayCount counts the number of elements in a JSON array at a path

func (*PatchableValues) Exists

func (p *PatchableValues) Exists(path string) bool

Exists checks whether a path exists

func (*PatchableValues) Get

func (p *PatchableValues) Get(path string) gjson.Result

Get value from patchable. It could be null value

func (*PatchableValues) GetOk

func (p *PatchableValues) GetOk(path string) (gjson.Result, bool)

GetOk returns value and `exists` flag

func (*PatchableValues) GetPatches

func (p *PatchableValues) GetPatches() []*utils.ValuesPatchOperation

func (*PatchableValues) GetRaw

func (p *PatchableValues) GetRaw(path string) any

GetRaw get empty interface

func (*PatchableValues) Remove

func (p *PatchableValues) Remove(path string)

func (*PatchableValues) Set

func (p *PatchableValues) Set(path string, value any)

func (*PatchableValues) WriteOutput

func (p *PatchableValues) WriteOutput(w io.Writer) error

Jump to

Keyboard shortcuts

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