Documentation
¶
Index ¶
- Variables
- func FromInterface(v any) (tengo.Object, error)
- func ToInterface(o tengo.Object) any
- type DyArray
- func (o *DyArray) BinaryOp(_ token.Token, _ tengo.Object) (tengo.Object, error)
- func (o *DyArray) CanIterate() bool
- func (o *DyArray) Copy() tengo.Object
- func (o *DyArray) Equals(x tengo.Object) bool
- func (o *DyArray) IndexGet(index tengo.Object) (res tengo.Object, err error)
- func (o *DyArray) IndexSet(index, val tengo.Object) (err error)
- func (o *DyArray) IsFalsy() bool
- func (o *DyArray) Iterate() tengo.Iterator
- func (o *DyArray) MarshalJSON() ([]byte, error)
- func (o *DyArray) String() string
- func (o *DyArray) TypeName() string
- func (o *DyArray) UnmarshalJSON(data []byte) error
- type DyArrayIterator
- func (i *DyArrayIterator) Copy() tengo.Object
- func (i *DyArrayIterator) Equals(tengo.Object) bool
- func (i *DyArrayIterator) IsFalsy() bool
- func (i *DyArrayIterator) Key() tengo.Object
- func (i *DyArrayIterator) Next() bool
- func (i *DyArrayIterator) String() string
- func (i *DyArrayIterator) TypeName() string
- func (i *DyArrayIterator) Value() tengo.Object
- type DyFunc
- type DyMap
- func (o *DyMap) BinaryOp(_ token.Token, _ tengo.Object) (tengo.Object, error)
- func (o *DyMap) CanIterate() bool
- func (o *DyMap) Copy() tengo.Object
- func (o *DyMap) Equals(x tengo.Object) bool
- func (o *DyMap) IndexGet(index tengo.Object) (res tengo.Object, err error)
- func (o *DyMap) IndexSet(index, val tengo.Object) (err error)
- func (o *DyMap) IsFalsy() bool
- func (o *DyMap) Iterate() tengo.Iterator
- func (o *DyMap) MarshalJSON() ([]byte, error)
- func (o *DyMap) String() string
- func (o *DyMap) TypeName() string
- func (o *DyMap) UnmarshalJSON(data []byte) error
- type DyMapIterator
- func (i *DyMapIterator) Copy() tengo.Object
- func (i *DyMapIterator) Equals(tengo.Object) bool
- func (i *DyMapIterator) IsFalsy() bool
- func (i *DyMapIterator) Key() tengo.Object
- func (i *DyMapIterator) Next() bool
- func (i *DyMapIterator) String() string
- func (i *DyMapIterator) TypeName() string
- func (i *DyMapIterator) Value() tengo.Object
- type DyScript
- type DyStruct
- func (o *DyStruct) BinaryOp(_ token.Token, _ tengo.Object) (tengo.Object, error)
- func (o *DyStruct) CanIterate() bool
- func (o *DyStruct) Copy() tengo.Object
- func (o *DyStruct) Equals(x tengo.Object) bool
- func (o *DyStruct) IndexGet(key tengo.Object) (res tengo.Object, err error)
- func (o *DyStruct) IndexSet(key, val tengo.Object) error
- func (o *DyStruct) IsFalsy() bool
- func (o *DyStruct) Iterate() tengo.Iterator
- func (o *DyStruct) MarshalJSON() ([]byte, error)
- func (o *DyStruct) String() string
- func (o *DyStruct) TypeName() string
- func (o *DyStruct) UnmarshalJSON(data []byte) error
- type DyStructIterator
- func (i *DyStructIterator) Copy() tengo.Object
- func (i *DyStructIterator) Equals(tengo.Object) bool
- func (i *DyStructIterator) IsFalsy() bool
- func (i *DyStructIterator) Key() tengo.Object
- func (i *DyStructIterator) Next() bool
- func (i *DyStructIterator) String() string
- func (i *DyStructIterator) TypeName() string
- func (i *DyStructIterator) Value() tengo.Object
Constants ¶
This section is empty.
Variables ¶
var ErrArrayNil = errors.New("cannot index nil array")
var ErrIndexNotAssignable = errors.New("index cannot be set")
var ErrMapIsNil = errors.New("cannot index nil map")
var ErrStructNotPointer = errors.New("from interface recieved non pointer struct")
Functions ¶
func ToInterface ¶
Types ¶
type DyArray ¶
type DyArray struct {
tengo.ObjectImpl
Value reflect.Value
// contains filtered or unexported fields
}
func (*DyArray) BinaryOp ¶
BinaryOp returns another object that is the result of a given binary operator and a right-hand side object.
func (*DyArray) CanIterate ¶
CanIterate returns whether the Object can be Iterated.
func (*DyArray) Equals ¶
Equals returns true if the value of the type is equal to the value of another object.
func (*DyArray) MarshalJSON ¶
func (*DyArray) UnmarshalJSON ¶
type DyArrayIterator ¶
type DyArrayIterator struct {
tengo.ObjectImpl
// contains filtered or unexported fields
}
DyArrayIterator is an iterator for an array.
func (*DyArrayIterator) Copy ¶
func (i *DyArrayIterator) Copy() tengo.Object
Copy returns a copy of the type.
func (*DyArrayIterator) Equals ¶
func (i *DyArrayIterator) Equals(tengo.Object) bool
Equals returns true if the value of the type is equal to the value of another object.
func (*DyArrayIterator) IsFalsy ¶
func (i *DyArrayIterator) IsFalsy() bool
IsFalsy returns true if the value of the type is falsy.
func (*DyArrayIterator) Key ¶
func (i *DyArrayIterator) Key() tengo.Object
Key returns the key or index value of the current element.
func (*DyArrayIterator) Next ¶
func (i *DyArrayIterator) Next() bool
Next returns true if there are more elements to iterate.
func (*DyArrayIterator) String ¶
func (i *DyArrayIterator) String() string
func (*DyArrayIterator) TypeName ¶
func (i *DyArrayIterator) TypeName() string
TypeName returns the name of the type.
func (*DyArrayIterator) Value ¶
func (i *DyArrayIterator) Value() tengo.Object
Value returns the value of the current element.
type DyFunc ¶
type DyFunc struct {
tengo.ObjectImpl
Value reflect.Value
// contains filtered or unexported fields
}
func (*DyFunc) Call ¶
Call takes an arbitrary number of arguments and returns a return value and/or an error.
type DyMap ¶
type DyMap struct {
tengo.ObjectImpl
Value reflect.Value
// contains filtered or unexported fields
}
func (*DyMap) BinaryOp ¶
BinaryOp returns another object that is the result of a given binary operator and a right-hand side object.
func (*DyMap) CanIterate ¶
CanIterate returns whether the Object can be Iterated.
func (*DyMap) Equals ¶
Equals returns true if the value of the type is equal to the value of another object.
func (*DyMap) MarshalJSON ¶
func (*DyMap) UnmarshalJSON ¶
type DyMapIterator ¶
type DyMapIterator struct {
tengo.ObjectImpl
// contains filtered or unexported fields
}
DyMapIterator represents an iterator for the map.
func (*DyMapIterator) Copy ¶
func (i *DyMapIterator) Copy() tengo.Object
Copy returns a copy of the type.
func (*DyMapIterator) Equals ¶
func (i *DyMapIterator) Equals(tengo.Object) bool
Equals returns true if the value of the type is equal to the value of another object.
func (*DyMapIterator) IsFalsy ¶
func (i *DyMapIterator) IsFalsy() bool
IsFalsy returns true if the value of the type is falsy.
func (*DyMapIterator) Key ¶
func (i *DyMapIterator) Key() tengo.Object
Key returns the key or index value of the current element.
func (*DyMapIterator) Next ¶
func (i *DyMapIterator) Next() bool
Next returns true if there are more elements to iterate.
func (*DyMapIterator) String ¶
func (i *DyMapIterator) String() string
func (*DyMapIterator) TypeName ¶
func (i *DyMapIterator) TypeName() string
TypeName returns the name of the type.
func (*DyMapIterator) Value ¶
func (i *DyMapIterator) Value() tengo.Object
Value returns the value of the current element.
type DyStruct ¶
type DyStruct struct {
tengo.ObjectImpl
Value reflect.Value
// contains filtered or unexported fields
}
func (*DyStruct) BinaryOp ¶
BinaryOp returns another object that is the result of a given binary operator and a right-hand side object.
func (*DyStruct) CanIterate ¶
CanIterate returns whether the Object can be Iterated.
func (*DyStruct) Equals ¶
Equals returns true if the value of the type is equal to the value of another object.
func (*DyStruct) MarshalJSON ¶
func (*DyStruct) UnmarshalJSON ¶
type DyStructIterator ¶
type DyStructIterator struct {
tengo.ObjectImpl
// contains filtered or unexported fields
}
DyArrayIterator is an iterator for an array.
func (*DyStructIterator) Copy ¶
func (i *DyStructIterator) Copy() tengo.Object
Copy returns a copy of the type.
func (*DyStructIterator) Equals ¶
func (i *DyStructIterator) Equals(tengo.Object) bool
Equals returns true if the value of the type is equal to the value of another object.
func (*DyStructIterator) IsFalsy ¶
func (i *DyStructIterator) IsFalsy() bool
IsFalsy returns true if the value of the type is falsy.
func (*DyStructIterator) Key ¶
func (i *DyStructIterator) Key() tengo.Object
Key returns the key or index value of the current element.
func (*DyStructIterator) Next ¶
func (i *DyStructIterator) Next() bool
Next returns true if there are more elements to iterate.
func (*DyStructIterator) String ¶
func (i *DyStructIterator) String() string
func (*DyStructIterator) TypeName ¶
func (i *DyStructIterator) TypeName() string
TypeName returns the name of the type.
func (*DyStructIterator) Value ¶
func (i *DyStructIterator) Value() tengo.Object
Value returns the value of the current element.