1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-12-01 22:19:32 +02:00
Files
ferret/pkg/runtime/core/value.go
Tim Voronov 8f2957e6ca Feature/optimized member expression (#653)
* Added new member path resolution logic

* Updated Getter and Setter interfaces

* Added ssupport of pre-compiled static member path

* Improved error handling
2021-09-08 21:01:22 -04:00

32 lines
681 B
Go

package core
import (
"context"
"encoding/json"
)
type (
// Value represents an interface of
// any type that needs to be used during runtime
Value interface {
json.Marshaler
Type() Type
String() string
Compare(other Value) int64
Unwrap() interface{}
Hash() uint64
Copy() Value
}
// Iterable represents an interface of a value that can be iterated by using an iterator.
Iterable interface {
Iterate(ctx context.Context) (Iterator, error)
}
// Iterator represents an interface of a value iterator.
// When iterator is exhausted it must return None as a value.
Iterator interface {
Next(ctx context.Context) (value Value, key Value, err error)
}
)