types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFieldMissing = fmt.Errorf("No field with such name")
View Source
var ErrIdxOutOfBounds = fmt.Errorf("Index out of bounds")
View Source
var ErrWrongVisit = fmt.Errorf("Not possible to visit a field for the value of this type")

Functions

This section is empty.

Types

type Node

type Node interface {
	Visit(field string) (Node, error)
	NodeType() NodeType
	Value() any
	SetField(field string, value any) error
	DeleteField(field string) error
	Serialize() ([]byte, error)
}

type NodeType

type NodeType string
var (
	NodeTypeString NodeType = "string"
	NodeTypeNumber NodeType = "number"
	NodeTypeBool   NodeType = "bool"
	NodeTypeObject NodeType = "object"
	NodeTypeArray  NodeType = "array"
	NodeTypeNull   NodeType = "null"
)

Jump to

Keyboard shortcuts

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