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
↓ 22 callers
Method
Optimize
Optimize applies a sequence of optimizations to an Ast within a given environment. If issues are encountered, the Issues.Err() return value will be n
cel/optimizer.go:77
↓ 22 callers
Method
SourceInfo
SourceInfo returns character offset and newline position information about expression elements.
cel/env.go:85
↓ 22 callers
Method
Value
Value returns the observed value of the given expression id if found, and a nil false result if not.
interpreter/evalstate.go:28
↓ 22 callers
Function
mustTypeCheck
(t testing.TB, expr string, opts ...any)
common/ast/navigable_test.go:634
↓ 21 callers
Method
AddFunctions
AddFunctions configures the checker with a list of function declarations. If there are overlapping declarations, the method will error.
checker/env.go:145
↓ 21 callers
Method
AsStructField
AsStructField casts the EntryExpr to a StructField The Kind() must be equal to StructFieldKind for the conversion to be well-defined.
common/ast/expr.go:150
↓ 21 callers
Method
DescribeType
DescribeType returns a `TypeDescription` for the `typeName` if it exists in the `pb.Db`.
common/types/pb/pb.go:235
↓ 21 callers
Method
Error
()
parser/antlr_parser.go:140
↓ 21 callers
Function
EstimateSize
EstimateSize returns a SizeEstimate for the given node from its computed size, estimator, or unknown.
common/cost/cost.go:418
↓ 21 callers
Method
Eval
Eval evaluates an Activation and produces an output.
interpreter/interpretable.go:35
↓ 21 callers
Method
IterVar
IterVar returns the iteration variable name. For one-variable comprehensions, the iter var refers to the element value when iterating over a list, or
common/ast/expr.go:278
↓ 21 callers
Function
Mul
Mul creates an expression representing the product of the given terms.
common/cost/model.go:719
↓ 21 callers
Function
NewOpaqueType
NewOpaqueType creates an abstract parameterized type with a given name.
common/types/types.go:556
↓ 21 callers
Function
Result
Result creates an expression referencing the size of the result.
common/cost/model.go:631
↓ 21 callers
Method
Set
(name string, value any)
cel/validator.go:162
↓ 21 callers
Function
makeQualifier
(t testing.TB, attrs AttributeFactory, fieldType *types.Type, qualID int64, val any)
interpreter/attributes_test.go:1529
↓ 20 callers
Method
CostTracker
CostTracker returns the active CostTracker for this evaluation pass, or nil.
interpreter/frame.go:373
↓ 20 callers
Function
DefaultSizingStrategy
DefaultSizingStrategy returns the default SizingStrategy implementation.
common/cost/default_strategy.go:27
↓ 20 callers
Method
GetType
GetType returns the type for the expression at the given id, if one exists, else types.DynType.
common/ast/ast.go:51
↓ 20 callers
Function
Lists
Lists returns a cel.EnvOption to configure extended functions for list manipulation. As a general note, all indices are zero-based. # Distinct Intro
ext/lists.go:226
↓ 20 callers
Function
MergeUnknowns
MergeUnknowns combines two unknown values into a new unknown value.
common/types/unknown.go:291
↓ 20 callers
Function
ModelVersion
ModelVersion pins the revision of the cost model's estimation and runtime tracking rules. If this option is not set, the latest cost model version is
common/cost/version.go:294
↓ 20 callers
Function
NewAttributePattern
NewAttributePattern produces a new mutable AttributePattern based on a variable name.
interpreter/attribute_patterns.go:54
↓ 20 callers
Function
NewErrFromString
NewErrFromString creates a new Err with the provided message. TODO: Audit the use of this function and standardize the error messages and codes.
common/types/err.go:67
↓ 20 callers
Method
NewList
NewList creates a list literal instruction with an optional set of elements.
parser/macro.go:205
↓ 20 callers
Function
Ranged
Ranged creates an expression where the lower bound is taken from minExpr and the upper bound from maxExpr.
common/cost/model.go:891
↓ 20 callers
Method
Size
Size returns the length of the argument list.
ext/formatting.go:778
↓ 20 callers
Method
Slice
(i, j int)
common/runes/buffer.go:27
↓ 20 callers
Function
StringScan
StringScan creates an expression representing the cost of scanning a string.
common/cost/model.go:927
↓ 20 callers
Method
TypeName
TypeName returns the qualified type name of the type. The type name is also used as the type's identifier name at type-check and interpretation time.
common/types/ref/reference.go:32
↓ 20 callers
Method
nextToken
()
parser/pratt_parser.go:246
↓ 20 callers
Method
track
(ctx TrackContext)
common/cost/model.go:100
↓ 19 callers
Function
ActualSize
ActualSize returns the size of the value for all traits.Sizer values, and returns a size of 1 for all other value types.
common/cost/cost.go:410
↓ 19 callers
Method
IterVar2
IterVar2 returns the second iteration variable name. When the value is non-empty, the comprehension is a two-variable comprehension.
common/ast/expr.go:283
↓ 19 callers
Function
Lib
Lib creates an EnvOption out of a Library, allowing libraries to be provided as functional args, and to be linked to each other.
cel/library.go:103
↓ 19 callers
Function
Min
Min creates an expression representing the minimum of two quantities.
common/cost/model.go:787
↓ 19 callers
Function
NewRefValMap
NewRefValMap returns a specialized traits.Mapper with CEL valued keys and values.
common/types/map.go:75
↓ 19 callers
Method
OptionalIndices
OptionalIndicies returns the list of optional indices in the list literal.
common/ast/expr.go:185
↓ 19 callers
Method
ReferenceMap
ReferenceMap returns the map of expression id to identifier, constant, and function references.
common/ast/ast.go:87
↓ 19 callers
Method
estimate
(ctx EstimateContext)
common/cost/model.go:99
↓ 18 callers
Method
AddIdents
AddIdents configures the checker with a list of variable declarations. If there are overlapping declarations, the method will error.
checker/env.go:134
↓ 18 callers
Function
AtMost
AtMost creates an expression representing a quantity bounded between 0 and the upper bound of maxExpr.
common/cost/model.go:896
↓ 18 callers
Method
Bindings
Bindings produces a set of function bindings, if any are defined.
common/decls/decls.go:360
↓ 18 callers
Function
Compare
Compare compares two strings, a for actual, e for expected, and returns true or false. The comparison is done, by filtering out whitespace (i.e. space
test/compare.go:24
↓ 18 callers
Method
Compare
Compare this value to the input other value, returning an Int: this < other -> Int(-1) this == other -> Int(0) this > other -> Int(1) If the com
common/types/traits/comparer.go:32
↓ 18 callers
Function
CostModel
CostModel configures overload cost estimators and cost trackers from a set of cost.OverloadModel definitions. Models are validated here because neith
cel/options.go:882
↓ 18 callers
Function
FunctionBinding
FunctionBinding provides the implementation of a variadic overload. The provided function is protected by a runtime type-guard which ensures runtime t
cel/decls.go:343
↓ 18 callers
Function
IsUnknownOrError
IsUnknownOrError returns whether the input element ref.Val is an ErrType or UnknownType.
common/types/util.go:22
↓ 18 callers
Function
LabelErrNode
LabelErrNode returns val unaltered it is not an Err or if the error has a non-zero AST node ID already present. Otherwise the id is added to the error
common/types/err.go:80
↓ 18 callers
Function
Macros
Macros option extends the macro set configured in the environment. Note: This option must be specified after ClearMacros if used together.
cel/options.go:268
↓ 18 callers
Function
ManualCost
ManualCost sets a custom FunctionEstimator and FunctionTracker for an overload whose cost or result size cannot be expressed declaratively with EvalCo
common/cost/model.go:1119
↓ 18 callers
Function
Name
Name sets the fully-qualified name of the Container.
common/containers/container.go:295
↓ 18 callers
Function
NewMap
NewMap returns a traits.Mapper backed by a typed Go map[K]V.
common/types/map.go:51
↓ 18 callers
Function
NewOptionalType
NewOptionalType creates an abstract parameterized type instance corresponding to CEL's notion of optional.
common/types/types.go:551
↓ 18 callers
Function
NewSourceInfo
NewSourceInfo creates a simple SourceInfo object from an input common.Source value.
common/ast/ast.go:201
↓ 18 callers
Function
NewStringSource
NewStringSource creates a new Source from the given contents and description.
common/source.go:84
↓ 18 callers
Method
NewStruct
NewStruct creates an Expr value representing a struct literal with a given type name and a set of field initializers.
common/ast/factory.go:72
↓ 18 callers
Function
NewTypeDesc
NewTypeDesc describes a simple or complex type with parameters.
common/env/env.go:780
↓ 18 callers
Function
ValOrErr
ValOrErr either returns the existing error or creates a new one. TODO: Audit the use of this function and standardize the error messages and codes.
common/types/err.go:107
↓ 18 callers
Method
Validate
Validate validates a given Ast within an Environment and collects a set of potential issues. The ValidatorConfig is generated from the set of ASTVali
cel/validator.go:138
↓ 18 callers
Function
mustNewExecutionFrame
(t testing.TB, input any)
interpreter/frame_test.go:713
↓ 18 callers
Method
reportError
(ctx any, format string, args ...any)
parser/antlr_parser.go:810
↓ 18 callers
Function
testNativeEnv
testEnv initializes the test environment common to all tests.
common/types/native_test.go:1863
↓ 17 callers
Method
Add
Add one or more overloads, returning an error if any Overload has the same Overload#Name.
interpreter/dispatcher.go:26
↓ 17 callers
Method
Args
Args returns the normalized arguments to the function overload. For receiver-style functions, the receiver target is arg 0.
interpreter/interpretable.go:130
↓ 17 callers
Method
CELTypeProvider
CELTypeProvider returns the `types.Provider` configured for the environment.
cel/env.go:852
↓ 17 callers
Method
FieldByName
FieldByName returns (FieldDescription, true) if the field name is declared within the type.
common/types/pb/type.go:109
↓ 17 callers
Method
FindStructType
FindStructType returns the Type give a qualified type name. For historical reasons, only struct types are expected to be returned through this method
common/types/provider.go:60
↓ 17 callers
Function
Functions
Functions returns the set of standard library function declarations and definitions for CEL.
common/stdlib/standard.go:908
↓ 17 callers
Method
IsZeroValue
IsZeroValue indicates whether the object is the zero value for the type.
common/types/traits/zeroer.go:20
↓ 17 callers
Function
NewContainer
NewContainer creates a new Container with the fully-qualified name.
common/containers/container.go:36
↓ 17 callers
Function
NewErrors
NewErrors creates a new instance of the Errors type.
common/errors.go:32
↓ 17 callers
Function
NewPartialActivation
NewPartialActivation returns an Activation which contains a list of AttributePattern values representing field and index operations that should result
interpreter/activation.go:206
↓ 17 callers
Method
ResolveName
ResolveName returns a value from the activation by qualified name, or false if the name could not be found.
interpreter/activation.go:31
↓ 17 callers
Method
Result
Result returns the size of the evaluated result, if present.
common/cost/model.go:73
↓ 17 callers
Function
TwoVarComprehensions
TwoVarComprehensions introduces support for two-variable comprehensions. The two-variable form of comprehensions looks similar to the one-variable co
ext/comprehensions.go:163
↓ 17 callers
Method
Visit
Visitor implementations.
parser/antlr_parser.go:292
↓ 17 callers
Method
createChild
(e Expr)
common/ast/navigable.go:374
↓ 17 callers
Function
hasTarget
hasTarget returns true if the expression or any of its subexpressions references the target object.
common/cost/model.go:118
↓ 17 callers
Method
id
(ctx any)
parser/helper.go:167
↓ 17 callers
Function
mustAdaptToProto
(e ast.Expr)
cel/macro.go:561
↓ 16 callers
Function
AsyncBinding
AsyncBinding provides the implementation of an asynchronous overload. The provided function is called in its own goroutine with the provided context.
cel/decls.go:368
↓ 16 callers
Function
ComposeTypes
ComposeTypes accepts a provider, adapter, and a list of types (ref.Type, proto.Message, protoreflect.FileDescriptor, or RegistryOption) and either: -
common/types/provider.go:205
↓ 16 callers
Function
ElemOf
ElemOf creates an expression referencing the element size of another expression.
common/cost/model.go:344
↓ 16 callers
Method
GetId
GetId returns the id rule contexts.
repl/parser/commands_parser.go:1568
↓ 16 callers
Method
NewMemberCall
NewMemberCall creates an Expr value representing a member function call.
common/ast/factory.go:37
↓ 16 callers
Function
Optimize
Optimize will pre-compute operations such as list and map construction and optimize call arguments to set membership tests. The set of optimizations w
interpreter/interpreter.go:207
↓ 16 callers
Method
OutputType
OutputType returns the output type of the expression if the Ast has been type-checked, else returns cel.DynType as the parse step cannot infer types.
cel/env.go:108
↓ 16 callers
Function
StdLib
StdLib returns an EnvOption for the standard library of CEL functions and macros.
cel/library.go:141
↓ 16 callers
Method
TypeMap
TypeMap returns the map of expression ids to type-checked types. If the AST is not type-checked, the map will be empty.
common/ast/ast.go:69
↓ 16 callers
Function
safeAddUint32
(a, b uint32)
common/types/overflow.go:431
↓ 15 callers
Method
AddLetVar
AddLetVar adds a let variable to the evaluation context. The expression is planned but evaluated lazily.
repl/evaluator.go:612
↓ 15 callers
Method
ArgTypes
ArgTypes contains the set of argument types expected by the overload. For member functions ArgTypes[0] represents the member operand type.
common/decls/decls.go:717
↓ 15 callers
Function
CostModelVersion
CostModelVersion pins cost estimation and runtime cost tracking to a revision of the cost model's rules. The pin applies to the standard models and t
cel/options.go:913
↓ 15 callers
Method
Description
Description gives a brief description of the source. Example descriptions are a file name or ui element.
common/source.go:32
↓ 15 callers
Function
EnableOptionalSyntax
EnableOptionalSyntax enables syntax for optional field and index selection.
parser/options.go:140
↓ 15 callers
Function
ExprToProto
ExprToProto serializes an ast.Expr value to a protobuf Expr representation.
common/ast/conversion.go:282
↓ 15 callers
Method
IsExactType
IsExactType indicates whether the two types are exactly the same. This check also verifies type parameter type names.
common/types/types.go:274
↓ 15 callers
Method
Merge
Merge combines an existing function declaration with another. If a function is extended, by say adding new overloads to an existing function, then it
common/decls/decls.go:146
↓ 15 callers
Function
NewValidator
NewValidator returns a named Validator instance.
common/env/env.go:695
← previous
next →
201–300 of 9,178, ranked by callers