mirror of
https://github.com/MontFerret/ferret.git
synced 2025-12-01 22:19:32 +02:00
* Added new member path resolution logic * Updated Getter and Setter interfaces * Added ssupport of pre-compiled static member path * Improved error handling
32 lines
681 B
Go
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)
|
|
}
|
|
)
|