daq

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundPath         = "NotFoundPath"
	NotConvertTypeNumber = errors.New("NotConvertTypeNumber")
	NotConvertTypeString = errors.New("NotConvertTypeString")
	NotConvertTypeArray  = errors.New("NotConvertTypeArray")
	NotConvertTypeObject = errors.New("NotConvertTypeObject")
	NotArrayIndex        = errors.New("NotArrayIndex")
	PathExistsNotObject  = errors.New("PathExistsNotObject")
)

Functions

This section is empty.

Types

type CallUpdate

type CallUpdate = func(index int, data interface{}) error

type Daq

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

func NewDaq

func NewDaq(data map[string]interface{}) *Daq

func (*Daq) Clone

func (d *Daq) Clone() *Daq

func (Daq) Data

func (d Daq) Data() map[string]interface{}

func (Daq) Delete

func (d Daq) Delete(location string) error

func (Daq) Query

func (d Daq) Query(location string) (*Query, error)

func (Daq) Update

func (d Daq) Update(location string, data interface{}) error

type ObjectMap

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

func (ObjectMap) Create

func (o ObjectMap) Create(name string, data interface{}) error

func (ObjectMap) CreatePath

func (o ObjectMap) CreatePath(location string, data interface{}) error

func (ObjectMap) Delete

func (o ObjectMap) Delete(name string) error

func (ObjectMap) Has

func (o ObjectMap) Has(name string) bool

func (ObjectMap) Query

func (o ObjectMap) Query(location string) *Query

type Query

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

func NewQuery

func NewQuery(data interface{}, paths []string, index int, update CallUpdate) *Query

func (*Query) Array

func (q *Query) Array() ([]interface{}, error)

func (*Query) ArrayIndex

func (q *Query) ArrayIndex() (interface{}, error)

func (*Query) Interface added in v0.0.6

func (q *Query) Interface() (interface{}, error)

func (*Query) Number

func (q *Query) Number() (float64, error)

func (*Query) Object

func (q *Query) Object() (*ObjectMap, error)

func (*Query) QueryTypeItem

func (q *Query) QueryTypeItem() (TypeData, error)

func (*Query) String

func (q *Query) String() (string, error)

func (*Query) Type

func (q *Query) Type() TypeData

func (*Query) Update

func (q *Query) Update(data interface{}) error

type TypeData

type TypeData int8
const (
	Number TypeData = 1
	String TypeData = 2
	Object TypeData = 3
	Array  TypeData = 4
)

type TypeDataPath

type TypeDataPath int8
const (
	PathData  TypeDataPath = 1
	ArrayData TypeDataPath = 2
)

Jump to

Keyboard shortcuts

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