lazynode

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: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownType  = errors.New("unknown object type")
	ErrInvalid      = errors.New("invalid state detected")
	ErrInvalidIndex = errors.New("invalid index referenced")
	ErrMissing      = errors.New("missing value")
)

Functions

This section is empty.

Types

type LazyNode

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

func DeepCopy

func DeepCopy(src *LazyNode) (*LazyNode, int, error)

func NewLazyNode

func NewLazyNode(raw *json.RawMessage) *LazyNode

func (*LazyNode) Equal

func (n *LazyNode) Equal(o *LazyNode) bool

func (*LazyNode) GetArray

func (n *LazyNode) GetArray() PartialArray

func (*LazyNode) GetDoc

func (n *LazyNode) GetDoc() PartialDoc

func (*LazyNode) IntoAry

func (n *LazyNode) IntoAry() (*PartialArray, error)

func (*LazyNode) IntoDoc

func (n *LazyNode) IntoDoc() (*PartialDoc, error)

func (*LazyNode) IsArray

func (n *LazyNode) IsArray() bool

func (*LazyNode) IsRawEmpty

func (n *LazyNode) IsRawEmpty() bool

func (*LazyNode) MarshalJSON

func (n *LazyNode) MarshalJSON() ([]byte, error)

func (*LazyNode) SetArray

func (n *LazyNode) SetArray(pArray PartialArray)

func (*LazyNode) SetDoc

func (n *LazyNode) SetDoc(pDoc PartialDoc)

func (*LazyNode) SetWhich

func (n *LazyNode) SetWhich(w int)

func (*LazyNode) TryAry

func (n *LazyNode) TryAry() bool

func (*LazyNode) TryDoc

func (n *LazyNode) TryDoc() bool

func (*LazyNode) UnmarshalJSON

func (n *LazyNode) UnmarshalJSON(data []byte) error

func (*LazyNode) Which

func (n *LazyNode) Which() int

type PartialArray

type PartialArray []*LazyNode

func (*PartialArray) Add

func (d *PartialArray) Add(key string, val *LazyNode) error

func (*PartialArray) Get

func (d *PartialArray) Get(key string) (*LazyNode, error)

func (*PartialArray) Remove

func (d *PartialArray) Remove(key string) error

func (*PartialArray) Set

func (d *PartialArray) Set(key string, val *LazyNode) error

set should only be used to implement the "replace" operation, so "key" must be an already existing index in "d".

type PartialDoc

type PartialDoc map[string]*LazyNode

func (*PartialDoc) Add

func (d *PartialDoc) Add(key string, val *LazyNode) error

func (*PartialDoc) Get

func (d *PartialDoc) Get(key string) (*LazyNode, error)

func (*PartialDoc) Remove

func (d *PartialDoc) Remove(key string) error

func (*PartialDoc) Set

func (d *PartialDoc) Set(key string, val *LazyNode) error

Jump to

Keyboard shortcuts

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