Documentation ¶
Index ¶
- Constants
- Variables
- func GetIn(ctx context.Context, from core.Value, byPath []core.Value) (core.Value, error)
- func MapHash(input map[string]core.Value) uint64
- func Parse(input interface{}) core.Value
- func SetIn(ctx context.Context, to core.Value, byPath []core.Value, value core.Value) error
- func ToArray(ctx context.Context, input core.Value) (core.Value, error)
- func ToBoolean(input core.Value) core.Value
- func Unmarshal(value json.RawMessage) (core.Value, error)
- type Array
- func (t *Array) Clone() core.Cloneable
- func (t *Array) Compare(other core.Value) int64
- func (t *Array) Copy() core.Value
- func (t *Array) Find(predicate ArrayPredicate) (core.Value, Boolean)
- func (t *Array) ForEach(predicate ArrayPredicate)
- func (t *Array) Get(idx Int) core.Value
- func (t *Array) Hash() uint64
- func (t *Array) IndexOf(item core.Value) Int
- func (t *Array) Insert(idx Int, value core.Value)
- func (t *Array) Length() Int
- func (t *Array) MarshalJSON() ([]byte, error)
- func (t *Array) Push(item core.Value)
- func (t *Array) RemoveAt(idx Int)
- func (t *Array) Set(idx Int, value core.Value) error
- func (t *Array) Slice(from, to Int) *Array
- func (t *Array) Sort() *Array
- func (t *Array) SortWith(sorter ArraySorter) *Array
- func (t *Array) String() string
- func (t *Array) Type() core.Type
- func (t *Array) Unwrap() interface{}
- type ArrayPredicate
- type ArraySorter
- type Binary
- type Boolean
- type DateTime
- type Float
- type Int
- type Object
- func (t *Object) Clone() core.Cloneable
- func (t *Object) Compare(other core.Value) int64
- func (t *Object) Copy() core.Value
- func (t *Object) ForEach(predicate ObjectPredicate)
- func (t *Object) Get(key String) (core.Value, Boolean)
- func (t *Object) Hash() uint64
- func (t *Object) Keys() []String
- func (t *Object) Length() Int
- func (t *Object) MarshalJSON() ([]byte, error)
- func (t *Object) MustGet(key String) core.Value
- func (t *Object) Remove(key String)
- func (t *Object) Set(key String, value core.Value)
- func (t *Object) String() string
- func (t *Object) Type() core.Type
- func (t *Object) Unwrap() interface{}
- func (t *Object) Values() []core.Value
- type ObjectPredicate
- type ObjectProperty
- type String
- func (t String) Compare(other core.Value) int64
- func (t String) Concat(other core.Value) String
- func (t String) Contains(other String) Boolean
- func (t String) Copy() core.Value
- func (t String) Hash() uint64
- func (t String) IndexOf(other String) Int
- func (t String) Length() Int
- func (t String) MarshalJSON() ([]byte, error)
- func (t String) String() string
- func (t String) Type() core.Type
- func (t String) Unwrap() interface{}
Constants ¶
View Source
const ( False = Boolean(false) True = Boolean(true) )
View Source
const ( EmptyString = String("") SpaceString = String(" ") )
View Source
const DefaultTimeLayout = time.RFC3339
View Source
const ZeroFloat = Float(0.0)
View Source
const ZeroInt = Int(0)
Variables ¶
View Source
var None = &none{}
View Source
var ZeroDateTime = DateTime{ time.Time{}, }
Functions ¶
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func NewArrayWith ¶
func (*Array) Find ¶ added in v0.7.0
func (t *Array) Find(predicate ArrayPredicate) (core.Value, Boolean)
func (*Array) ForEach ¶
func (t *Array) ForEach(predicate ArrayPredicate)
func (*Array) MarshalJSON ¶
func (*Array) SortWith ¶ added in v0.5.0
func (t *Array) SortWith(sorter ArraySorter) *Array
type ArraySorter ¶ added in v0.5.0
type Boolean ¶
type Boolean bool
func MustParseBoolean ¶ added in v0.7.0
func MustParseBoolean(input interface{}) Boolean
func NewBoolean ¶
func ParseBoolean ¶
func (Boolean) MarshalJSON ¶
type DateTime ¶
func MustParseDateTime ¶ added in v0.7.0
func MustParseDateTime(input interface{}) DateTime
func NewCurrentDateTime ¶
func NewCurrentDateTime() DateTime
func NewDateTime ¶
func ParseDateTime ¶
func ParseDateTimeWith ¶
func (DateTime) MarshalJSON ¶
type Float ¶
type Float float64
func MustParseFloat ¶ added in v0.7.0
func MustParseFloat(input interface{}) Float
func ParseFloat ¶
func (Float) MarshalJSON ¶
type Int ¶
type Int int64
func MustParseInt ¶ added in v0.7.0
func MustParseInt(input interface{}) Int
func (Int) MarshalJSON ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func NewObjectWith ¶
func NewObjectWith(props ...*ObjectProperty) *Object
func (*Object) Compare ¶
Compare compares the source object with other core.Value The behavior of the Compare is similar to the comparison of objects in ArangoDB
func (*Object) ForEach ¶
func (t *Object) ForEach(predicate ObjectPredicate)
func (*Object) MarshalJSON ¶
type ObjectProperty ¶
type ObjectProperty struct {
// contains filtered or unexported fields
}
func NewObjectProperty ¶
func NewObjectProperty(name string, value core.Value) *ObjectProperty
type String ¶
type String string
func MustParseString ¶ added in v0.7.0
func MustParseString(input interface{}) String
func NewStringFromRunes ¶
func ParseString ¶
func (String) MarshalJSON ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.