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
↓ 9 callers
Method
SetKindCase
SetKindCase replaces the contents of the current expression with the contents of the other. The SetKindCase takes ownership of any expression instanc
common/ast/expr.go:113
↓ 9 callers
Method
SetOffsetRange
SetOffsetRange sets the OffsetRange for the given expression id.
common/ast/ast.go:369
↓ 9 callers
Function
SingletonUnaryBinding
SingletonUnaryBinding creates a singleton function definition to be used for all function overloads. Note, this approach works well if operand is exp
common/decls/decls.go:518
↓ 9 callers
Method
State
State of the evaluation, non-nil if the OptTrackState or OptExhaustiveEval is specified within EvalOptions.
cel/program.go:197
↓ 9 callers
Function
TypeDescs
TypeDescs adds type declarations from any protoreflect.FileDescriptor, protoregistry.Files, google.protobuf.FileDescriptorProto or google.protobuf.Fil
cel/options.go:436
↓ 9 callers
Method
TypeName
TypeName returns the type-erased fully qualified runtime type name. TypeName implements the ref.Type interface method.
common/types/types.go:372
↓ 9 callers
Function
Union
Union creates an expression representing the union interval of multiple expressions.
common/cost/model.go:838
↓ 9 callers
Method
append
(s string)
common/debug/debug.go:276
↓ 9 callers
Function
argumentsOnly
argumentsOnly marks the model of a short-circuiting operator, which is exempt from minCallCost.
common/cost/model.go:1604
↓ 9 callers
Function
benchmarkMemoryTracker
(b *testing.B, expr string, vars []*decls.VariableDecl, in any, enableTracking bool, memOpts ...types.MemoryTr
interpreter/runtimememory_test.go:331
↓ 9 callers
Method
copy
()
repl/evaluator.go:400
↓ 9 callers
Function
costV0
costV0 records the estimate a case produces under cost.ModelVersion0, for the cost tables' estimatedCostV0 fields. It exists because the constructors
ext/sets_test.go:493
↓ 9 callers
Function
evalExpr
(t *testing.T, env *cel.Env, expr string, vars map[string]any)
ext/security/hmac/hmac_test.go:35
↓ 9 callers
Method
isLegacyTracked
isLegacyTracked reports whether the legacy cost model derived the element size of the container from the shape of the expression, rather than from a s
common/cost/estimator.go:635
↓ 9 callers
Function
isTypeTag
(node *yaml.Node, wantTag yamlNodeType)
policy/yaml.go:96
↓ 9 callers
Function
newTestFrame
newTestFrame creates an ExecutionFrame with an evaluation context attached.
interpreter/async_test.go:53
↓ 9 callers
Function
nilTestExpr
(t testing.TB)
common/ast/expr_test.go:495
↓ 9 callers
Function
sanitizeStructTypeName
(structType string)
common/types/provider.go:895
↓ 9 callers
Function
updateContextPlans
Attempt to update context in place after an update. This is done eagerly to help avoid introducing an invalid 'let' expression. The planned expression
repl/evaluator.go:550
↓ 9 callers
Function
versionOf
versionOf reports the cost model version of an EstimateContext.
common/cost/model.go:1301
↓ 8 callers
Method
AddImports
AddImports appends a set of imports to the config.
common/env/env.go:192
↓ 8 callers
Function
ArgKey
ArgKey creates an expression referencing the key size of the argument at the given index.
common/cost/model.go:238
↓ 8 callers
Method
AsCost
AsCost converts a size estimate to an equivalent cost estimate.
common/cost/cost.go:307
↓ 8 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
common/decls/decls.go:1016
↓ 8 callers
Method
ComputeResult
ComputeResult tracks and computes the result of the given asynchronous function. The first invocation for a given (node id, args) tuple registers the
interpreter/frame.go:395
↓ 8 callers
Method
ConcurrentEval
ConcurrentEval evaluates the program concurrently, returning a channel that will receive the final EvalResult when all asynchronous operations complet
cel/program.go:74
↓ 8 callers
Function
Cost
Cost estimates the cost of the parsed and type checked CEL expression.
common/cost/estimator.go:149
↓ 8 callers
Function
CostSizingStrategy
CostSizingStrategy configures a SizingStrategy for both cost estimation and runtime cost tracking.
cel/options.go:893
↓ 8 callers
Method
CreateEnv
CreateEnv creates a singleton CEL environment with the configured environment options.
tools/compiler/compiler.go:95
↓ 8 callers
Function
EagerlyValidateDeclarations
EagerlyValidateDeclarations ensures that any collisions between configured declarations are caught at the time of the `NewEnv` call. Eagerly validati
cel/options.go:240
↓ 8 callers
Function
EncodersVersion
EncodersVersion sets the library version for encoder extensions.
ext/encoders.go:168
↓ 8 callers
Method
Error
Error returns the error message for LimitExceededError.
common/cost/tracker.go:118
↓ 8 callers
Function
ErrorRecoveryLimit
ErrorRecoveryLimit limits the number of attempts the parser will perform to recover from an error.
parser/options.go:68
↓ 8 callers
Function
EvalStateObserver
EvalStateObserver provides an observer which records the value associated with the given expression id. EvalState must be provided to the observer.
interpreter/interpreter.go:98
↓ 8 callers
Function
FromConfig
FromConfig produces and applies a set of EnvOption values derived from an env.Config object. For configuration elements which refer to features outsi
cel/options.go:607
↓ 8 callers
Function
FunctionDocs
FunctionDocs configures documentation from a list of strings separated by newlines.
common/decls/decls.go:484
↓ 8 callers
Method
GetExpr
()
fuzzing/cel_go_lpm.pb.go:76
↓ 8 callers
Method
GetStartLocation
GetStartLocation calculates the human-readable 1-based line and 0-based column of the first character of the expression node at the id.
common/ast/ast.go:385
↓ 8 callers
Method
HasIterVar2
HasIterVar2 returns true if the second iteration variable is non-empty.
common/ast/expr.go:286
↓ 8 callers
Function
InferFileFormat
InferFileFormat infers the file format from the file path.
tools/compiler/compiler.go:201
↓ 8 callers
Function
InitEmptyLiteralContext
(p *LiteralContext)
parser/gen/cel_parser.go:5499
↓ 8 callers
Function
InitEmptyLiteralContext
(p *LiteralContext)
repl/parser/commands_parser.go:9457
↓ 8 callers
Method
IsList
IsList returns true if the field is a repeated value. This method will also return true for map values, so check whether the field is also a map.
common/types/pb/type.go:366
↓ 8 callers
Method
IsMap
IsMap returns true if the field is of map type.
common/types/pb/type.go:347
↓ 8 callers
Function
JSONFieldNames
JSONFieldNames configures the Db to support proto field accesses by their JSON names.
common/types/pb/pb.go:91
↓ 8 callers
Method
JSONFieldNames
JSONFieldNames returns whether json field names are enabled in this registry.
common/types/provider.go:268
↓ 8 callers
Function
KeyOf
KeyOf creates an expression referencing the key size of another expression.
common/cost/model.go:604
↓ 8 callers
Method
Kind
Kind indicates general category of the type.
common/types/types.go:284
↓ 8 callers
Method
Kind
()
common/ast/expr.go:329
↓ 8 callers
Function
Max
Max creates an expression representing the maximum of two quantities.
common/cost/model.go:809
↓ 8 callers
Function
MaxRecursionDepth
MaxRecursionDepth limits the maximum depth the parser will attempt to parse the expression before giving up.
parser/options.go:40
↓ 8 callers
Method
NativeToValue
NativeToValue converts various "native" types to ref.Val with this specific implementation providing support for custom proto-based types. This metho
common/types/provider.go:612
↓ 8 callers
Function
NewActivation
NewActivation returns an activation based on a map-based binding where the map keys are expected to be qualified names used with ResolveName calls. T
cel/program.go:95
↓ 8 callers
Function
NewEvalState
NewEvalState returns an EvalState instanced used to observe the intermediate evaluations of an expression.
interpreter/evalstate.go:44
↓ 8 callers
Function
NewListCallEstimate
NewListCallEstimate creates a CallEstimate for a call that allocates a list, adding CallCost and ListCreateBaseCost to work and setting ResultSize to
common/cost/cost.go:401
↓ 8 callers
Method
NewMap
NewMap creates a CreateStruct instruction for a map where the map is comprised of the optional set of key, value entries.
parser/macro.go:209
↓ 8 callers
Method
OffsetRanges
OffsetRanges returns a map of expression id to OffsetRange values where the range indicates either: the start and end position in the input stream whe
common/ast/ast.go:352
↓ 8 callers
Function
OptionalTypesVersion
OptionalTypesVersion configures the version of the optional type library. The version limits which functions are available. Only functions introduced
cel/library.go:434
↓ 8 callers
Method
RegisterMessage
RegisterMessage registers a protocol buffer message and its dependencies.
common/types/ref/provider.go:73
↓ 8 callers
Method
ResidualAst
ResidualAst takes an Ast and its EvalDetails to produce a new Ast which only contains the attribute references which are unknown. Residual expression
cel/env.go:931
↓ 8 callers
Function
SafeSubtract
SafeSubtract returns the difference of x - y, saturating at zero. If x is saturated (math.MaxUint64), it remains saturated.
common/cost/cost.go:95
↓ 8 callers
Function
Sets
Sets returns a cel.EnvOption to configure namespaced set relationship functions. There is no set type within CEL, and while one may be introduced in
ext/sets.go:77
↓ 8 callers
Function
TargetElem
TargetElem creates an expression referencing the element size of the receiver / target object.
common/cost/model.go:303
↓ 8 callers
Method
Type
Type returns the type constructed.
interpreter/interpretable.go:142
↓ 8 callers
Function
UnknownCostEstimate
UnknownCostEstimate returns a cost with an unknown impact.
common/cost/cost.go:328
↓ 8 callers
Function
ValidateHomogeneousAggregateLiterals
ValidateHomogeneousAggregateLiterals checks that all list and map literals entries have the same types, i.e. no mixed list element types or mixed map
cel/validator.go:245
↓ 8 callers
Function
addFunctionBindings
(t testing.TB, dispatcher Dispatcher)
interpreter/interpreter_test.go:2860
↓ 8 callers
Function
assertShared
(t *testing.T, reg *Registry)
common/types/provider_test.go:75
↓ 8 callers
Function
cacheableAggregateSize
cacheableAggregateSize reports whether a size computed with the given sizer is safe to memoize on the value. Only totals from computations which verif
common/types/size_calc.go:145
↓ 8 callers
Function
createTestJWT
(t *testing.T, header, payload map[string]any)
ext/security/jwt/jwt_test.go:31
↓ 8 callers
Function
durationOf
(d time.Duration)
common/types/duration.go:39
↓ 8 callers
Function
eval
eval will evaluate a given program `prg` against a set of variables `vars` and return the output, eval details (optional), or error that results from
codelab/solution/codelab.go:404
↓ 8 callers
Function
file_test_proto2pb_test_all_types_proto_rawDescGZIP
()
test/proto2pb/test_all_types.pb.go:1256
↓ 8 callers
Method
getElem
(ind int)
common/types/list.go:841
↓ 8 callers
Method
structPtrFrom
(obj any, expectedPtrTyp, expectedStructTyp unsafe.Pointer)
common/types/native.go:855
↓ 8 callers
Method
typeOf
(id int64)
ext/formatting_v2.go:547
↓ 8 callers
Method
typeOf
(id int64)
ext/formatting.go:607
↓ 8 callers
Function
unwrapStruct
(obj any)
common/types/native.go:869
↓ 8 callers
Method
visit
(expr ast.Expr)
parser/unparser.go:123
↓ 7 callers
Method
AccuIdentName
AccuIdentName reports the name of the accumulator variable to be used within a comprehension.
common/ast/factory.go:47
↓ 7 callers
Method
AddIncludedFunctions
AddIncludedFunctions allow-lists one or more functions from the subset. Note, this option will override any excluded functions.
common/env/env.go:683
↓ 7 callers
Function
AsPartialActivation
AsPartialActivation walks the activation hierarchy and returns the first PartialActivation, if found.
interpreter/activation.go:247
↓ 7 callers
Function
AsyncBinding
AsyncBinding provides the implementation of an asynchronous overload. The provided function is called in its own goroutine with the provided context.
common/decls/decls.go:1053
↓ 7 callers
Method
CollectMetadata
CollectMetadata records the source position information of a given YAML node, and returns the id associated with the source metadata which is returned
policy/parser.go:724
↓ 7 callers
Method
ConditionalAttribute
ConditionalAttribute creates an attribute with two Attribute branches, where the Attribute that is resolved depends on the boolean evaluation of the i
interpreter/attributes.go:43
↓ 7 callers
Function
ContextProtoVars
ContextProtoVars uses the fields of the input proto.Messages as top-level variables within an Activation. Consider using with `DeclareContextProto` t
cel/options.go:1065
↓ 7 callers
Method
CopyASTAndMetadata
CopyASTAndMetadata copies the input AST and propagates the macro metadata into the AST being optimized.
cel/optimizer.go:294
↓ 7 callers
Method
CreateList
CreateList records list literal construction cost.
common/cost/tracker.go:191
↓ 7 callers
Function
CustomTypeProvider
CustomTypeProvider replaces the types.Provider implementation with a custom one. The `provider` variable type may either be types.Provider or ref.Typ
cel/options.go:187
↓ 7 callers
Function
EquivAST
EquivAST determines whether two ASTs are structurally equivalent. The comparison ignores numeric IDs except for resolving references and types. If bo
common/ast/equiv.go:101
↓ 7 callers
Function
ExhaustiveEval
ExhaustiveEval replaces operations that short-circuit with versions that evaluate expressions and couples this behavior with the TrackState() decorato
interpreter/interpreter.go:192
↓ 7 callers
Method
Expr
()
parser/gen/cel_parser.go:600
↓ 7 callers
Method
Extensions
Extensions returns the set of extensions present in the source.
common/ast/ast.go:441
↓ 7 callers
Method
FindFieldType
FieldFieldType returns the field type for a checked type value. Returns false if the field could not be found.
common/types/ref/provider.go:40
↓ 7 callers
Method
FindIdent
(identName string)
cel/options.go:1241
↓ 7 callers
Method
GetE
GetE returns the e rule contexts.
repl/parser/commands_parser.go:955
↓ 7 callers
Method
GetName
()
test/proto2pb/test_all_types.pb.go:780
↓ 7 callers
Method
HasLateBinding
HasLateBinding returns true if the function has late bindings. A function cannot mix late bindings with other bindings.
common/decls/decls.go:343
↓ 7 callers
Function
InitEmptyPrimaryContext
(p *PrimaryContext)
parser/gen/cel_parser.go:2810
↓ 7 callers
Function
InitEmptyPrimaryContext
(p *PrimaryContext)
repl/parser/commands_parser.go:6768
← previous
next →
501–600 of 9,178, ranked by callers