Documentation ¶
Index ¶
- Constants
- func Upstream(selector *Selector, derefLast bool, refLast bool) func(state *est.State) unsafe.Pointer
- type Discoveryable
- type DiscoveryableIface
- type Expression
- type Expressions
- type Func
- type Function
- type Functions
- func (f *Functions) FuncSelector(name string, parent *Selector) (*Selector, bool)
- func (f *Functions) IsFuncNs(ns string) bool
- func (f *Functions) Method(rType reflect.Type, id string, call *expr.Call) (*Func, error)
- func (f *Functions) NewFunc(name string, function interface{}, resultType reflect.Type) (*Func, error)
- func (f *Functions) RegisterFuncNs(ns string, funcs interface{}) error
- func (f *Functions) RegisterFunction(name string, function interface{}) error
- func (f *Functions) RegisterFunctionKind(methodName string, funcDetails KindFunction) error
- func (f *Functions) RegisterStandaloneFunction(name string, function *Function) error
- func (f *Functions) RegisterTypeFunc(receiverType reflect.Type, typeFunc *TypeFunc) error
- func (f *Functions) TryDetectResultType(prev *Selector, methodName string, call *expr.Call) (reflect.Type, error)
- type FunctionsIndex
- type Funeexpression
- type Interface
- type KindFunction
- type KindIndex
- type Map
- type MethodResultTyper
- type Operand
- func (o *Operand) AsInterface(valuePtr unsafe.Pointer) interface{}
- func (o *Operand) AsValue(valuePtr unsafe.Pointer) interface{}
- func (o *Operand) Exec(state *est.State) unsafe.Pointer
- func (o *Operand) ExecInterface(state *est.State) interface{}
- func (o *Operand) ExecReflectValue(state *est.State) reflect.Value
- func (o *Operand) IsIndirect() bool
- func (o *Operand) Pointer(state *est.State) unsafe.Pointer
- func (o *Operand) SetType(rType reflect.Type)
- func (o *Operand) SetUnifier(x converter.UnifyFn)
- type ResultTyper
- type Selector
- func FunctionSelector(id string, field *xunsafe.Field, aFunc *Func, parent *Selector) *Selector
- func NewCycleSelector(id string, field *xunsafe.Field, parent *Selector, indirect bool, ...) *Selector
- func NewInterfaceSelector(id string, placeholder string, xOperand, indexOperand *Operand, ...) (*Selector, error)
- func NewLiteralSelector(id string, sType reflect.Type, value interface{}, parent *Selector) *Selector
- func NewMapSelector(id string, placeholder string, mapOperand, indexOperand *Operand, ...) (*Selector, error)
- func NewSelector(id, name string, sType reflect.Type, parent *Selector) *Selector
- func SelectorWithField(id string, field *xunsafe.Field, parent *Selector, indirect bool, ...) *Selector
- func SliceSelector(id string, placeholder string, sliceOperand, indexOperand *Operand, ...) (*Selector, error)
- type Selectors
- type ShouldDerefLast
- type ShouldRefLast
- type Slice
- type TypeFunc
Constants ¶
View Source
const ( X = 0 Y = 1 Z = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Discoveryable ¶ added in v0.2.0
type Discoveryable interface {
Discover(aFunc interface{}) (func(operands []*Operand, state *est.State) (interface{}, error), reflect.Type, bool)
}
Discoveryable allows optimizing method calls. if receiver T, receives args T1,T2 then it is possible to do type assertion like follow actual, ok := aFunc.(func(receiver T, a1 T1, a2 T2))
type DiscoveryableIface ¶ added in v0.2.0
type Expression ¶
type Expression struct { LiteralPtr *unsafe.Pointer Type reflect.Type *Selector est.New Unify converter.UnifyFn }
func NewExpression ¶
func NewExpression(selector *Selector) *Expression
type Expressions ¶
type Expressions []*Expression
type Func ¶
type Functions ¶
type Functions struct {
// contains filtered or unexported fields
}
func EmptyFunctions ¶ added in v0.2.0
func EmptyFunctions() *Functions
func NewFunctions ¶
func NewFunctions(options ...interface{}) *Functions
func (*Functions) FuncSelector ¶ added in v0.2.0
func (*Functions) RegisterFuncNs ¶ added in v0.2.0
func (*Functions) RegisterFunction ¶
func (*Functions) RegisterFunctionKind ¶ added in v0.2.0
func (f *Functions) RegisterFunctionKind(methodName string, funcDetails KindFunction) error
func (*Functions) RegisterStandaloneFunction ¶ added in v0.2.0
func (*Functions) RegisterTypeFunc ¶ added in v0.2.0
type FunctionsIndex ¶ added in v0.2.0
type FunctionsIndex struct {
// contains filtered or unexported fields
}
func (*FunctionsIndex) Add ¶ added in v0.2.0
func (i *FunctionsIndex) Add(name string, details KindFunction)
func (*FunctionsIndex) Get ¶ added in v0.2.0
func (i *FunctionsIndex) Get(id string) (KindFunction, bool)
type Funeexpression ¶ added in v0.2.0
type Interface ¶ added in v0.2.0
type Interface struct {
// contains filtered or unexported fields
}
type KindFunction ¶ added in v0.2.0
type KindIndex ¶ added in v0.2.0
type KindIndex struct {
// contains filtered or unexported fields
}
func (*KindIndex) Add ¶ added in v0.2.0
func (i *KindIndex) Add(name string, details KindFunction) error
func (*KindIndex) Get ¶ added in v0.2.0
func (i *KindIndex) Get(kind reflect.Kind) (*FunctionsIndex, bool)
func (*KindIndex) GetOrCreate ¶ added in v0.2.0
func (i *KindIndex) GetOrCreate(kind reflect.Kind) *FunctionsIndex
func (*KindIndex) KindFunction ¶ added in v0.2.0
type MethodResultTyper ¶ added in v0.2.0
type Operand ¶
type Operand struct { LiteralPtr *unsafe.Pointer Sel *Selector Comp est.Compute Type reflect.Type XType *xunsafe.Type NamedIFace bool // contains filtered or unexported fields }
func (*Operand) AsInterface ¶ added in v0.2.0
func (*Operand) ExecInterface ¶ added in v0.2.0
func (*Operand) ExecReflectValue ¶ added in v0.2.0
func (*Operand) IsIndirect ¶
func (*Operand) SetUnifier ¶ added in v0.2.0
type ResultTyper ¶ added in v0.2.0
type Selector ¶
type Selector struct { ID string Type reflect.Type *xunsafe.Field Indirect bool Parent *Selector Literal unsafe.Pointer Func *Func Slice *Slice Args []*Operand Placeholder string ParentOffset uintptr Map *Map InterfaceExec *Interface Cycle *Selector IsFieldSelector bool }
Selector represent data selector
func FunctionSelector ¶
func NewCycleSelector ¶ added in v0.2.0
func NewInterfaceSelector ¶ added in v0.2.0
func NewLiteralSelector ¶ added in v0.2.0
func NewMapSelector ¶ added in v0.2.0
func NewSelector ¶
NewSelector create a selector
func SelectorWithField ¶
type Selectors ¶
func NewSelectors ¶
func NewSelectors() *Selectors
type ShouldDerefLast ¶ added in v0.2.0
type ShouldDerefLast bool
type ShouldRefLast ¶ added in v0.2.0
type ShouldRefLast bool
Click to show internal directories.
Click to hide internal directories.