Versions in this module Expand all Collapse all v0 v0.2.2 Jan 18, 2026 v0.2.0 Jan 17, 2026 v0.1.24 Jan 7, 2026 v0.1.23 Jan 7, 2026 v0.1.22 Dec 19, 2025 v0.1.21 Dec 19, 2025 v0.1.19 Nov 3, 2025 Changes in this version + type BinaryOpNode struct + Left Node + Operator Operator + Right Node + func (n *BinaryOpNode) Evaluate(ctx context.Context, variables map[string]any) (any, error) + type Cache struct + func NewCache(config *CacheConfig) *Cache + func (c *Cache) Clear() + func (c *Cache) Get(key string) (any, bool) + func (c *Cache) Len() int + func (c *Cache) PurgeExpired() int + func (c *Cache) Remove(key string) bool + func (c *Cache) Set(key string, value any) error + func (c *Cache) Size() int64 + func (c *Cache) Stats() CacheStats + type CacheConfig struct + CleanupInterval time.Duration + MaxSize int64 + OnEvict func(key string, value any) + TTL time.Duration + type CacheStats struct + Evictions int64 + Hits int64 + Misses int64 + Size int64 + type Config struct + AllowCustom bool + CacheEnabled bool + CacheSize int + CacheTTL time.Duration + MaxArrayLength int + MaxDepth int + MaxStringLength int + StrictMode bool + Timeout int + func DefaultConfig() *Config + type Expression struct + func NewExpression(config *Config) *Expression + func (e *Expression) AddToCache(key string, value any) + func (e *Expression) Evaluate(ctx context.Context, expr string, variables map[string]any) (any, error) + func (e *Expression) EvaluateParallel(ctx context.Context, exprs []string, variables map[string]any) ([]any, error) + func (e *Expression) EvaluateWithMetrics(ctx context.Context, expr string, variables map[string]any) (any, *Metrics, error) + func (e *Expression) RegisterFunction(name string, handler any, validator Validator) error + func (e *Expression) RegisterOperator(name string, precedence int, handler func(left, right any) (any, error)) error + func (e *Expression) ValidateSyntax(expr string) error + type ExpressionError struct + Col int + Line int + Message string + Type string + func (e *ExpressionError) Error() string + type Function struct + Handler any + Name string + Validator Validator + type FunctionCallNode struct + Args []Node + Name string + func (f *FunctionCallNode) Evaluate(ctx context.Context, variables map[string]any) (any, error) + type IdentifierNode struct + Name string + func (n *IdentifierNode) Evaluate(ctx context.Context, variables map[string]any) (any, error) + type Metrics struct + CacheHits int64 + CacheMisses int64 + EvalTime time.Duration + ParseTime time.Duration + type Node interface + Evaluate func(ctx context.Context, variables map[string]any) (any, error) + type NumberNode struct + Value float64 + func (n *NumberNode) Evaluate(ctx context.Context, variables map[string]any) (any, error) + type Operator struct + Handler func(left, right any) (any, error) + Name string + Precedence int + type StringNode struct + Value string + func (n *StringNode) Evaluate(ctx context.Context, variables map[string]any) (any, error) + type Token struct + Col int + Line int + Type TokenType + Value string + type TokenType int + const TokenComma + const TokenDot + const TokenEOF + const TokenFunction + const TokenIdentifier + const TokenLParen + const TokenNumber + const TokenOperator + const TokenRParen + const TokenString + type Validator func(args []any) error Other modules containing this package github.com/ncobase/ncore