Documentation ¶
Index ¶
- func FieldMatchName(struct_type reflect.Type, field_name string) func(in string) bool
- func GetBuiltinTypes() []types.Any
- func Match(scope types.Scope, pattern string, target string) bool
- func MaterializeToArray(ctx context.Context, scope types.Scope, stored_query types.StoredQuery) []types.Row
- type AddDispatcher
- type AddProtocol
- type AssociativeDispatcher
- func (self *AssociativeDispatcher) AddImpl(elements ...AssociativeProtocol)
- func (self *AssociativeDispatcher) Associative(scope types.Scope, a types.Any, b types.Any) (types.Any, bool)
- func (self AssociativeDispatcher) Copy() AssociativeDispatcher
- func (self *AssociativeDispatcher) GetMembers(scope types.Scope, a types.Any) []string
- type AssociativeProtocol
- type BoolDispatcher
- type BoolProtocol
- type DefaultAssociative
- type DivDispatcher
- type DivProtocol
- type EqDispatcher
- type EqProtocol
- type GtDispatcher
- type GtProtocol
- type IterateDispatcher
- type IterateProtocol
- type LazyFunctionWrapper
- type LazyWrapper
- func (self LazyWrapper) Applicable(a types.Any, b types.Any) bool
- func (self LazyWrapper) Associative(scope types.Scope, a types.Any, b types.Any) (res types.Any, pres bool)
- func (self LazyWrapper) GetMembers(scope types.Scope, a types.Any) []string
- func (self LazyWrapper) InAttributes(name string) bool
- type LtDispatcher
- type LtProtocol
- type MembershipDispatcher
- type MembershipProtocol
- type MulDispatcher
- type MulProtocol
- type RegexDispatcher
- type RegexProtocol
- type SubDispatcher
- type SubProtocol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldMatchName ¶
func GetBuiltinTypes ¶
func MaterializeToArray ¶
Types ¶
type AddDispatcher ¶
type AddDispatcher struct {
// contains filtered or unexported fields
}
func (*AddDispatcher) AddImpl ¶
func (self *AddDispatcher) AddImpl(elements ...AddProtocol)
func (AddDispatcher) Copy ¶
func (self AddDispatcher) Copy() AddDispatcher
type AddProtocol ¶
type AddProtocol interface { Applicable(a types.Any, b types.Any) bool Add(scope types.Scope, a types.Any, b types.Any) types.Any }
Add protocol
type AssociativeDispatcher ¶
type AssociativeDispatcher struct {
// contains filtered or unexported fields
}
func (*AssociativeDispatcher) AddImpl ¶
func (self *AssociativeDispatcher) AddImpl(elements ...AssociativeProtocol)
When adding external protocols they need to be considered before any built in protocols so they are able to override the built ins. Therefore add them to the front of the protocols array.
func (*AssociativeDispatcher) Associative ¶
func (AssociativeDispatcher) Copy ¶
func (self AssociativeDispatcher) Copy() AssociativeDispatcher
func (*AssociativeDispatcher) GetMembers ¶
type AssociativeProtocol ¶
type AssociativeProtocol interface { Applicable(a types.Any, b types.Any) bool // Returns a value obtained by dereferencing field b from // object a. If not present return pres == false and possibly // a default value in res. If no default is present res must // be nil. Associative(scope types.Scope, a types.Any, b types.Any) (res types.Any, pres bool) GetMembers(scope types.Scope, a types.Any) []string }
Associative protocol.
func NewLazyStructWrapper ¶
func NewLazyStructWrapper( base types.Any, attributes ...string) AssociativeProtocol
type BoolDispatcher ¶
type BoolDispatcher struct {
// contains filtered or unexported fields
}
func (*BoolDispatcher) AddImpl ¶
func (self *BoolDispatcher) AddImpl(elements ...BoolProtocol)
func (BoolDispatcher) Copy ¶
func (self BoolDispatcher) Copy() BoolDispatcher
type BoolProtocol ¶
type BoolProtocol interface { Applicable(a types.Any) bool Bool(ctx context.Context, scope types.Scope, a types.Any) bool }
This protocol implements the truth value.
type DefaultAssociative ¶
type DefaultAssociative struct{}
Last resort associative - uses reflect package to resolve struct fields.
func (DefaultAssociative) Applicable ¶
func (DefaultAssociative) Associative ¶
func (DefaultAssociative) GetMembers ¶
Get the members which are callable by VFilter.
type DivDispatcher ¶
type DivDispatcher struct {
// contains filtered or unexported fields
}
func (*DivDispatcher) AddImpl ¶
func (self *DivDispatcher) AddImpl(elements ...DivProtocol)
func (DivDispatcher) Copy ¶
func (self DivDispatcher) Copy() DivDispatcher
type DivProtocol ¶
type DivProtocol interface { Applicable(a types.Any, b types.Any) bool Div(scope types.Scope, a types.Any, b types.Any) types.Any }
Divtiply protocol
type EqDispatcher ¶
type EqDispatcher struct {
// contains filtered or unexported fields
}
func (*EqDispatcher) AddImpl ¶
func (self *EqDispatcher) AddImpl(elements ...EqProtocol)
func (EqDispatcher) Copy ¶
func (self EqDispatcher) Copy() EqDispatcher
type EqProtocol ¶
type EqProtocol interface { Applicable(a types.Any, b types.Any) bool Eq(scope types.Scope, a types.Any, b types.Any) bool }
Eq protocol
type GtDispatcher ¶
type GtDispatcher struct {
// contains filtered or unexported fields
}
func (*GtDispatcher) AddImpl ¶
func (self *GtDispatcher) AddImpl(elements ...GtProtocol)
func (GtDispatcher) Copy ¶
func (self GtDispatcher) Copy() GtDispatcher
type GtProtocol ¶
type GtProtocol interface { Applicable(a types.Any, b types.Any) bool Gt(scope types.Scope, a types.Any, b types.Any) bool }
Less than protocol
type IterateDispatcher ¶
type IterateDispatcher struct {
// contains filtered or unexported fields
}
The Iterator protocol allows types to be iterated over.
func (*IterateDispatcher) AddImpl ¶
func (self *IterateDispatcher) AddImpl(elements ...IterateProtocol)
func (IterateDispatcher) Copy ¶
func (self IterateDispatcher) Copy() IterateDispatcher
type IterateProtocol ¶
type IterateProtocol interface { Applicable(a types.Any) bool Iterate(ctx context.Context, scope types.Scope, a types.Any) <-chan types.Row }
This protocol implements the truth value.
type LazyFunctionWrapper ¶
type LazyFunctionWrapper struct {
// contains filtered or unexported fields
}
func (*LazyFunctionWrapper) MarshalJSON ¶
func (self *LazyFunctionWrapper) MarshalJSON() ([]byte, error)
func (*LazyFunctionWrapper) Reduce ¶
func (self *LazyFunctionWrapper) Reduce(ctx context.Context) types.Any
func (*LazyFunctionWrapper) ReduceWithScope ¶
type LazyWrapper ¶
type LazyWrapper struct { Type reflect.Type IndirectType reflect.Type Attributes []string Methods []string }
This is a lazy wrapper around an object providing getters to property calls.
func (LazyWrapper) Applicable ¶
func (LazyWrapper) Associative ¶
func (LazyWrapper) GetMembers ¶
func (LazyWrapper) InAttributes ¶
func (self LazyWrapper) InAttributes(name string) bool
type LtDispatcher ¶
type LtDispatcher struct {
// contains filtered or unexported fields
}
func (*LtDispatcher) AddImpl ¶
func (self *LtDispatcher) AddImpl(elements ...LtProtocol)
func (LtDispatcher) Copy ¶
func (self LtDispatcher) Copy() LtDispatcher
type LtProtocol ¶
type LtProtocol interface { Applicable(a types.Any, b types.Any) bool Lt(scope types.Scope, a types.Any, b types.Any) bool }
Less than protocol
type MembershipDispatcher ¶
type MembershipDispatcher struct {
// contains filtered or unexported fields
}
func (*MembershipDispatcher) AddImpl ¶
func (self *MembershipDispatcher) AddImpl(elements ...MembershipProtocol)
func (MembershipDispatcher) Copy ¶
func (self MembershipDispatcher) Copy() MembershipDispatcher
func (MembershipDispatcher) Membership ¶
type MembershipProtocol ¶
type MembershipProtocol interface { Applicable(a types.Any, b types.Any) bool Membership(scope types.Scope, a types.Any, b types.Any) bool }
Membership protocol (the "in" operator)
type MulDispatcher ¶
type MulDispatcher struct {
// contains filtered or unexported fields
}
func (*MulDispatcher) AddImpl ¶
func (self *MulDispatcher) AddImpl(elements ...MulProtocol)
func (MulDispatcher) Copy ¶
func (self MulDispatcher) Copy() MulDispatcher
type MulProtocol ¶
type MulProtocol interface { Applicable(a types.Any, b types.Any) bool Mul(scope types.Scope, a types.Any, b types.Any) types.Any }
Multiply protocol
type RegexDispatcher ¶
type RegexDispatcher struct {
// contains filtered or unexported fields
}
func (*RegexDispatcher) AddImpl ¶
func (self *RegexDispatcher) AddImpl(elements ...RegexProtocol)
func (RegexDispatcher) Copy ¶
func (self RegexDispatcher) Copy() RegexDispatcher
type RegexProtocol ¶
type RegexProtocol interface { Applicable(pattern types.Any, target types.Any) bool Match(scope types.Scope, pattern types.Any, target types.Any) bool }
Regex Match protocol
type SubDispatcher ¶
type SubDispatcher struct {
// contains filtered or unexported fields
}
func (*SubDispatcher) AddImpl ¶
func (self *SubDispatcher) AddImpl(elements ...SubProtocol)
func (SubDispatcher) Copy ¶
func (self SubDispatcher) Copy() SubDispatcher