Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cel-expr/cel-go
/ functions
Functions
9,178 in github.com/cel-expr/cel-go
⨍
Functions
9,178
◇
Types & classes
1,189
↓ 39 callers
Method
Size
Size returns the number of entries in the map.
common/ast/expr.go:218
↓ 39 callers
Method
ToDisplayString
ToDisplayString decorates the error message with the source location.
common/error.go:46
↓ 38 callers
Function
MemberOverload
MemberOverload creates a member function OverloadModel with functional options.
common/cost/model.go:1175
↓ 38 callers
Function
Sum
Sum creates an expression representing the sum of the given terms.
common/cost/model.go:660
↓ 38 callers
Method
Type
Type returns the TypeValue of the value.
common/types/ref/reference.go:58
↓ 37 callers
Method
GetValue
GetValue returns the wrapped value contained in the optional.
common/types/optional.go:50
↓ 37 callers
Method
IsMemberFunction
IsMemberFunction returns whether the call has a non-nil target indicating it is a member function
common/ast/expr.go:167
↓ 37 callers
Method
Iterator
Iterator returns an Iterator over the map key set.
common/types/map.go:121
↓ 37 callers
Method
LA
LA implements (antlr.CharStream).LA.
parser/input.go:38
↓ 37 callers
Function
OptionalOf
OptionalOf returns an optional value which wraps a concrete CEL value.
common/types/optional.go:35
↓ 37 callers
Method
Parameters
Parameters returns the list of type parameters if set. For ListKind, Parameters()[0] represents the list element type For MapKind, Parameters()[0] re
common/types/types.go:343
↓ 37 callers
Function
Target
Target creates an expression referencing the size of the receiver / target object.
common/cost/model.go:298
↓ 36 callers
Function
Macros
Macros adds the given macros to the parser.
parser/options.go:116
↓ 35 callers
Function
BeforeVersion
BeforeVersion records the options that priced the overload before the given model revision. At revisions earlier than version, the overload is config
common/cost/model.go:1145
↓ 35 callers
Method
ConvertToType
ConvertToType supports type conversions between CEL value types supported by the expression language.
common/types/ref/reference.go:52
↓ 35 callers
Function
IsUnknown
IsUnknown returns whether the element ref.Val is in instance of *types.Unknown
common/types/unknown.go:264
↓ 35 callers
Method
Key
Key returns the map entry key expression.
common/ast/expr.go:227
↓ 35 callers
Function
RangedCostEstimate
RangedCostEstimate returns a cost estimate bounded by min and max.
common/cost/cost.go:343
↓ 34 callers
Method
AbsoluteAttribute
AbsoluteAttribute creates an attribute that refers to a top-level variable name. Checked expressions generate absolute attribute with a single name.
interpreter/attributes.go:39
↓ 34 callers
Method
AsMap
AsMap adapts the expr into a MapExpr. The Kind() must be equal to a MapKind for the conversion to be well-defined.
common/ast/expr.go:92
↓ 34 callers
Function
Compile
Compile is a convenience function that constructs a new Env using the provided EnvOption values, compiles the expression string, and plans an executab
cel/cel.go:26
↓ 34 callers
Method
EnterRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1088
↓ 34 callers
Method
ExitRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1094
↓ 34 callers
Method
Fields
Fields returns the set of field initializers in the struct expression as EntryExpr values.
common/ast/expr.go:245
↓ 34 callers
Function
NativeTypes
NativeTypes creates a type provider which uses reflect.Type and reflect.Value instances to produce type definitions that can be used within CEL. All
ext/native.go:122
↓ 34 callers
Method
Operand
Operand returns the selection operand expression.
common/ast/expr.go:200
↓ 34 callers
Function
Overload
Overload creates a global function OverloadModel with functional options.
common/cost/model.go:1170
↓ 34 callers
Method
Resolve
Resolve returns the value of the Attribute and whether it was present given an Activation. For objects which support safe traversal, the value may be
interpreter/attributes.go:113
↓ 33 callers
Function
AstToString
AstToString converts an Ast back to a string if possible. Note, the conversion may not be an exact replica of the original expression, but will produ
cel/io.go:142
↓ 33 callers
Method
Error
Error implements the error interface method.
interpreter/attributes.go:1669
↓ 33 callers
Method
EstimateCost
EstimateCost estimates the cost of a type checked CEL expression using the length estimates of input data and extension functions provided by estimato
cel/env.go:955
↓ 33 callers
Method
HasNext
HasNext returns true if there are unvisited elements in the Iterator.
common/types/traits/iterator.go:32
↓ 33 callers
Function
Length
Length creates an expression referencing the shallow top-level length of a single value (its CEL size() / ActualSize), independent of the sizing strat
common/cost/model.go:452
↓ 33 callers
Function
ResultSize
ResultSize sets the result size expression for the overload model. Passing nil in a BeforeVersion entry clears any result size inherited from the encl
common/cost/model.go:1107
↓ 32 callers
Function
Bindings
Bindings returns a cel.EnvOption to configure support for local variable bindings in expressions. # Cel.Bind Binds a simple identifier to an initial
ext/bindings.go:54
↓ 32 callers
Function
Container
Container sets the container for resolving variable names. Defaults to an empty container. If all references within an expression are relative to a p
cel/options.go:280
↓ 31 callers
Method
AddQualifier
AddQualifier adds a qualifier on the Attribute or error if the qualification is not a valid qualifier type.
interpreter/attributes.go:105
↓ 31 callers
Method
CELTypeAdapter
CELTypeAdapter returns the `types.Adapter` configured for the environment.
cel/env.go:847
↓ 31 callers
Method
Parse
Parse parses the input expression value `txt` to a Ast and/or a set of Issues. This form of Parse creates a Source value for the input `txt` and forw
cel/env.go:764
↓ 30 callers
Method
HasValue
HasValue returns true if the optional has a value.
common/types/optional.go:45
↓ 30 callers
Function
NewConstValue
NewConstValue creates a new constant valued Interpretable.
interpreter/interpretable.go:314
↓ 30 callers
Function
NewUnknown
NewUnknown creates a new unknown at a given expression id for an attribute. If the attribute is nil, the attribute value will be the `unspecifiedAttr
common/types/unknown.go:156
↓ 30 callers
Method
Parse
Parse generates an internal parsed policy representation from a YAML input file. The internal representation ensures that CEL expressions are tracked
policy/parser.go:572
↓ 29 callers
Function
EvalActivation
EvalActivation runs an InterpretableV2 Exec method safely with any Activation, wrapping it in a pooled ExecutionFrame if needed and releasing it after
interpreter/interpretable.go:209
↓ 29 callers
Function
MemberOverload
MemberOverload defines a new receiver-style overload (or member function) with an overload id, argument types, and result type. Through the use of Ove
cel/decls.go:317
↓ 29 callers
Method
NewCall
NewCall creates a function call Expr value for a global (free) function.
parser/macro.go:279
↓ 29 callers
Function
Scale
Scale creates an expression that scales another expression by a constant factor, rounding up. Factors are constant so that a model's runtime charge d
common/cost/model.go:760
↓ 28 callers
Method
AggregateSize
AggregateSize returns the size of the input value, if known. Otherwise, a unit size of 1 is returned.
common/types/aggregate_sizer.go:21
↓ 28 callers
Function
EnableMacroCallTracking
EnableMacroCallTracking ensures that call expressions which are replaced by macros are tracked in the `SourceInfo` of parsed and checked expressions.
cel/options.go:1109
↓ 28 callers
Function
Encoders
Encoders returns a cel.EnvOption to configure extended functions for string, byte, and object encodings. Note: all functions use the 'base64', 'json'
ext/encoders.go:156
↓ 28 callers
Function
NavigateAST
NavigateAST converts an AST to a NavigableExpr
common/ast/navigable.go:46
↓ 28 callers
Function
NewDynamicMap
NewDynamicMap returns a traits.Mapper value with dynamic key, value pairs.
common/types/map.go:40
↓ 28 callers
Function
NewSizeCalculator
NewSizeCalculator returns a new SizeCalculator configured with optional SizeCalculatorOption settings.
common/types/size_calc.go:89
↓ 28 callers
Function
SafeAdd
SafeAdd returns the sum of the input values, saturating at math.MaxUint64.
common/cost/cost.go:78
↓ 27 callers
Method
AccuInit
AccuInit returns the accumulation variable initialization expression.
common/ast/expr.go:292
↓ 27 callers
Method
Entries
Entries returns the map key value pairs as EntryExpr values.
common/ast/expr.go:215
↓ 27 callers
Method
IsOptional
IsOptional indicates whether the given element index is optional.
common/ast/expr.go:188
↓ 27 callers
Method
IterRange
IterRange returns the iteration range expression.
common/ast/expr.go:269
↓ 27 callers
Method
MultiplyByCostFactor
MultiplyByCostFactor multiplies a SizeEstimate by a cost factor and returns the CostEstimate with the nearest integer of the result, rounded up.
common/cost/cost.go:264
↓ 27 callers
Function
NewRefValList
NewRefValList returns a traits.Lister with ref.Val elements. This type specialization is used with list literals within CEL expressions.
common/types/list.go:132
↓ 27 callers
Method
Target
Target returns the target of the expression if one is present.
common/ast/expr.go:170
↓ 27 callers
Function
UnaryBinding
UnaryBinding provides the implementation of a unary overload. The provided function is protected by a runtime type-guard which ensures runtime type ag
cel/decls.go:331
↓ 26 callers
Method
AsMapEntry
AsMapEntry casts the EntryExpr to a MapEntry. The Kind() must be equal to MapEntryKind for the conversion to be well-defined.
common/ast/expr.go:145
↓ 26 callers
Function
Check
Check performs type checking, giving a typed AST. The input is a parsed AST and an env which encapsulates type binding of variables, declarations of
checker/checker.go:51
↓ 26 callers
Method
Clone
Clone makes a shallow copy of the tracker with no accumulated cost. The different clones can be used independently from each other: they share only co
common/cost/tracker.go:166
↓ 26 callers
Method
IDs
IDs returns the list of ids with recorded values.
interpreter/evalstate.go:24
↓ 26 callers
Method
NewLiteral
Literal creates an Expr value for a scalar literal value.
parser/macro.go:202
↓ 25 callers
Method
AccuVar
AccuVar returns the accumulation variable name.
common/ast/expr.go:289
↓ 25 callers
Method
AsStruct
AsStruct adapts the expr into a StructExpr. The Kind() must be equal to a StructKind for the conversion to be well-defined.
common/ast/expr.go:102
↓ 25 callers
Function
BinaryBinding
BinaryBinding provides the implementation of a binary overload. The provided function is protected by a runtime type-guard which ensures runtime type
cel/decls.go:337
↓ 25 callers
Method
EstimateSize
EstimateSize returns the SizeEstimate of an AstNode. If nil is returned, the size of the node is calculated by the SizingStrategy.
common/cost/estimator.go:40
↓ 25 callers
Method
FieldName
FieldName returns the field name being selected from the operand.
common/ast/expr.go:203
↓ 25 callers
Method
IsTestOnly
IsTestOnly indicates whether the select expression is a presence test generated by a macro.
common/ast/expr.go:206
↓ 25 callers
Method
LoopStep
LoopStep returns the loop step expression.
common/ast/expr.go:298
↓ 25 callers
Function
NewAstNode
NewAstNode returns an AstNode with the given expression, path, type, and derived size.
common/cost/estimator.go:92
↓ 25 callers
Function
NewStringList
NewStringList returns a traits.Lister containing only strings.
common/types/list.go:125
↓ 24 callers
Function
ASTValidators
ASTValidators configures a set of ASTValidator instances into the target environment. Validators are applied in the order in which they are specified
cel/validator.go:103
↓ 24 callers
Method
CopyAll
(ctx *UnaryContext)
parser/gen/cel_parser.go:1790
↓ 24 callers
Method
CopyAll
(ctx *UnaryContext)
repl/parser/commands_parser.go:5748
↓ 24 callers
Method
LoopCondition
LoopCondition returns the loop condition expression.
common/ast/expr.go:295
↓ 24 callers
Function
NewCallEstimate
NewCallEstimate creates a new CallEstimate with the given cost and optional result size.
common/cost/cost.go:395
↓ 24 callers
Function
NewEnv
NewEnv returns a new *Env with the given parameters.
checker/env.go:86
↓ 24 callers
Function
NewEvaluator
NewEvaluator returns an inialized evaluator
repl/evaluator.go:537
↓ 24 callers
Function
NewTypeTypeWithParam
NewTypeTypeWithParam creates a type with a type parameter. Used for type-checking purposes, but equivalent to TypeType otherwise.
common/types/types.go:619
↓ 24 callers
Method
Path
Path returns a field path through the provided type declarations to the type of the AstNode, or nil if the AstNode does not represent type directly re
common/cost/estimator.go:48
↓ 23 callers
Method
Copy
Copy the input expression with a brand new set of identifiers.
cel/macro.go:59
↓ 23 callers
Method
Find
Find returns a value, if one exists, for the input key. If the key is not found the function returns (nil, false).
common/types/map.go:118
↓ 23 callers
Function
NewDb
NewDb creates a new `pb.Db` with an empty type name to file description map.
common/types/pb/pb.go:99
↓ 23 callers
Method
NewInterpretable
NewInterpretable creates an InterpretableV2 from a checked expression and an optional list of PlannerOption values.
interpreter/interpreter.go:36
↓ 23 callers
Function
ParseStructTag
ParseStructTag configures the struct tag to parse. The 0th item in the tag is used as the name of the CEL field. A tag starting with "-" (e.g. `cel:"
common/types/native.go:144
↓ 23 callers
Method
RenumberIDs
RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids.
common/ast/expr.go:105
↓ 22 callers
Function
AggregateSizingStrategy
AggregateSizingStrategy returns a SizingStrategy that computes recursive size estimates by following paths during cost estimation, and calculates actu
common/cost/aggregate_strategy.go:42
↓ 22 callers
Method
GetText
GetText implements (antlr.CharStream).GetText.
parser/input.go:94
↓ 22 callers
Function
MatchDescendants
MatchDescendants takes a NavigableExpr and ExprMatcher and produces a list of NavigableExpr values matching the input criteria in post-order (bottom u
common/ast/navigable.go:106
↓ 22 callers
Function
MemberOverload
MemberOverload defines a new receiver-style overload (or member function) with an overload id, argument types, and result type. Through the use of Ove
common/decls/decls.go:622
↓ 22 callers
Function
NewAttributeTrail
NewAttributeTrail creates a new simple attribute from a variable name.
common/types/unknown.go:34
↓ 22 callers
Function
NewExecutionFrame
NewExecutionFrame creates a new execution frame from the pool.
interpreter/frame.go:135
↓ 22 callers
Method
NewList
NewList creates an Expr value representing a list literal expression with optional indices. Optional indices will typically be empty unless the CEL o
common/ast/factory.go:55
↓ 22 callers
Function
NewNativeType
NewNativeType constructs a NativeType instance for a Go struct reflect.Type.
common/types/native.go:48
↓ 22 callers
Function
NewStaticOptimizer
NewStaticOptimizer creates a StaticOptimizer with a sequence of ASTOptimizer's to be applied to a checked expression.
cel/optimizer.go:46
← previous
next →
101–200 of 9,178, ranked by callers