dot

package
v0.24.8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path(pos rt.Reference, path []rt.Dotted) (ret rt.Reference, err error)

step into the current value multiple times

Types

type Cursor

type Cursor = rt.Cursor

func MakeCursor

func MakeCursor(run rt.Runtime, name string) Cursor

supports requesting fields from the runtime where the name is either the id of an object or meta.Variables

func MakeValueCursor

func MakeValueCursor(ks rt.Kinds, val rt.Value) Cursor

supports requesting fields from a record uses the runtime to create sub-records when needed.

type Field

type Field string

field name to pick a value from a record.

func (Field) Field

func (dot Field) Field() string

raw string

func (Field) Peek

func (dot Field) Peek(c Cursor) (Cursor, error)

func (Field) Poke

func (dot Field) Poke(c Cursor, newValue rt.Value) (err error)

func (Field) String

func (dot Field) String() string

print friendly string

type Index

type Index int

zero-based index to pick a value from a list.

func (Index) Index

func (dot Index) Index() int

raw int

func (Index) Peek

func (dot Index) Peek(c Cursor) (Cursor, error)

func (Index) Poke

func (dot Index) Poke(c Cursor, newValue rt.Value) error

func (Index) String

func (dot Index) String() string

print friendly string

type Reference

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

the final position in a path where we might want to get or put a value. implements rt.Reference

func MakeReference

func MakeReference(run rt.Runtime, name string) Reference

func MakeReferenceValue added in v0.24.8

func MakeReferenceValue(run rt.Runtime, rec rt.Value) Reference

func (Reference) Dot

func (at Reference) Dot(next rt.Dotted) (ret rt.Reference, err error)

step into the current value

func (Reference) GetValue

func (at Reference) GetValue() (ret rt.Value, err error)

read a value

func (Reference) SetValue

func (at Reference) SetValue(newValue rt.Value) (err error)

write a value

Jump to

Keyboard shortcuts

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