Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cel-expr/cel-go
/ functions
Functions
7,240 in github.com/cel-expr/cel-go
⨍
Functions
7,240
◇
Types & classes
842
↓ 4 callers
Method
NewStruct
NewStruct creates a struct literal expression with an optional set of field initializers.
parser/macro.go:215
↓ 4 callers
Method
NewStructField
NewStructField creates a new struct field initializer from the field name and value.
parser/macro.go:218
↓ 4 callers
Function
NewTextSourceWithLimit
NewTextSourceWithLimit creates a new Source from the input text string while enforcing a maximum code point count when needed.
common/source.go:79
↓ 4 callers
Method
ObserveExec
ObserveExec evaluates an interpretable and performs per-evaluation state-tracking. This method is concurrency safe and the expectation is that the ob
interpreter/interpretable.go:179
↓ 4 callers
Method
OperandTrait
OperandTrait returns the trait mask of the first operand to the overload call, e.g. `traits.Indexer`
common/decls/decls.go:685
↓ 4 callers
Method
Output
Output returns the output expression, or empty expression if output is not set.
policy/parser.go:328
↓ 4 callers
Method
Output
Output returns the compiled output expression associated with the match block, if set.
policy/compiler.go:145
↓ 4 callers
Method
OutputType
OutputType returns the output type of the first match clause as all match clauses are validated for agreement prior to construction fo the CompiledRul
policy/compiler.go:61
↓ 4 callers
Function
OverloadIsNonStrict
OverloadIsNonStrict enables the function to be called with error and unknown argument values. Note: do not use this option unless absoluately necessa
common/decls/decls.go:915
↓ 4 callers
Function
OverloadOperandTrait
OverloadOperandTrait configures a set of traits which the first argument to the overload must implement in order to be successfully invoked.
common/decls/decls.go:924
↓ 4 callers
Function
Parse
Parse parses a repl command line into a command object. This provides the normalized command name plus any parsed parameters (e.g. variable names in l
repl/commands.go:181
↓ 4 callers
Function
ParseDescription
ParseDescription takes a single string containing newline characters and splits it into a multiline description. All empty lines will be skipped. Ret
common/doc.go:76
↓ 4 callers
Method
Process
Process processes the command provided.
repl/evaluator.go:1356
↓ 4 callers
Function
ProtoAsType
ProtoAsType converts a canonical CEL celpb.Type protobuf type to a CEL-native type representation.
common/types/types.go:692
↓ 4 callers
Method
ProtoKind
ProtoKind returns the protobuf reflected kind of the field.
common/types/pb/type.go:373
↓ 4 callers
Function
ProtoToSourceInfo
ProtoToSourceInfo deserializes the protobuf into a native SourceInfo value.
common/ast/conversion.go:573
↓ 4 callers
Method
Push
Push creates a new Scopes value which references the current Scope as its parent.
checker/scopes.go:54
↓ 4 callers
Method
QualInt
QualInt adds an int qualifier pattern to the AttributePattern. The index may be either a map or list index.
interpreter/attribute_patterns.go:71
↓ 4 callers
Method
Qualify
Qualify replicates the Attribute.Qualify method to permit extension and interception of object qualification.
interpreter/interpretable.go:101
↓ 4 callers
Method
Receive
Receive implements traits.Receiver.Receive.
common/types/duration.go:157
↓ 4 callers
Function
Regex
Regex returns a cel.EnvOption to configure extended functions for regular expression operations. Note: all functions use the 'regex' namespace. If yo
ext/regex.go:104
↓ 4 callers
Method
RegisterDescriptor
RegisterDescriptor produces a `FileDescription` from a `FileDescriptor` and registers the message and enum types into the `pb.Db`.
common/types/pb/pb.go:168
↓ 4 callers
Method
Resolve
Resolve returns the value of the Attribute given the current Activation.
interpreter/interpretable.go:112
↓ 4 callers
Method
Rule
Rule returns the rule value, or nil if the rule is not set.
policy/parser.go:354
↓ 4 callers
Method
SetMacroCall
SetMacroCall records a macro call at a specific location.
common/ast/ast.go:327
↓ 4 callers
Method
SetMetadata
SetMetadata updates a named metadata key with the given value.
policy/parser.go:125
↓ 4 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:78
↓ 4 callers
Function
SingletonBinaryBinding
SingletonBinaryBinding creates a singleton function definition to be used with all function overloads. Note, this approach works well if operand is e
cel/decls.go:269
↓ 4 callers
Method
Source
Source returns the policy file contents as a CEL source object.
policy/parser.go:60
↓ 4 callers
Method
SourceID
SourceID returns the expression id associated with the output expression.
policy/compiler.go:172
↓ 4 callers
Function
SourceInfoToProto
SourceInfoToProto serializes an ast.SourceInfo value to a protobuf SourceInfo object.
common/ast/conversion.go:529
↓ 4 callers
Method
Subset
Subset returns a new function declaration which contains only the overloads with the specified IDs. If the subset function contains no overloads, then
common/decls/decls.go:228
↓ 4 callers
Function
ToAST
ToAST converts a CheckedExpr protobuf to an AST instance.
common/ast/conversion.go:78
↓ 4 callers
Function
ToProto
ToProto converts an AST to a CheckedExpr protobouf.
common/ast/conversion.go:44
↓ 4 callers
Method
TypeAdapter
TypeAdapter returns the `ref.TypeAdapter` configured for the environment. Deprecated: use CELTypeAdapter()
cel/env.go:719
↓ 4 callers
Method
Unary
Getter signatures
repl/parser/commands_parser.go:5410
↓ 4 callers
Function
UnparseType
UnparseType pretty-prints a type for the REPL.
repl/typefmt.go:41
↓ 4 callers
Function
ValToConstant
ValToConstant converts a CEL-native ref.Val to a protobuf Constant. Only simple scalar types are supported by this method.
common/ast/conversion.go:640
↓ 4 callers
Function
VariableDecls
VariableDecls configures a set of fully defined cel.VariableDecl instances in the environment.
cel/decls.go:157
↓ 4 callers
Method
VersionNumber
VersionNumber returns the parsed version string, or an error if the version cannot be parsed.
common/env/env.go:500
↓ 4 callers
Method
Visit
(tree antlr.ParseTree)
repl/typefmt.go:65
↓ 4 callers
Function
WrapOnColumn
WrapOnColumn wraps the output expression when its string length exceeds a specified limit for operators set by WrapOnOperators function or by default,
parser/unparser.go:606
↓ 4 callers
Method
Zero
Zero returns an empty immutable protobuf message when the description is a protobuf message type.
common/types/pb/type.go:38
↓ 4 callers
Function
adaptToV2
adaptToV2 adapts a V1 Interpretable implementation to the V2 interface. This adapter is used to bridge the legacy Interpretable interface to the mode
interpreter/interpretable.go:54
↓ 4 callers
Function
addInt64Checked
addInt64Checked performs addition with overflow detection of two int64 values. If the operation fails the error return value will be non-nil.
common/types/overflow.go:29
↓ 4 callers
Method
applyContext
applyContext evaluates the let expressions in the context to build an activation for the given expression. returns the environment for compiling and p
repl/evaluator.go:1010
↓ 4 callers
Function
convertProto
(src, dst proto.Message)
cel/io.go:342
↓ 4 callers
Function
doubleToInt64Lossless
(v float64)
common/types/overflow.go:410
↓ 4 callers
Method
eval
(expr string)
tools/celtest/test_runner.go:857
↓ 4 callers
Function
expectNativeToValue
(t *testing.T, in any, out ref.Val)
common/types/provider_test.go:857
↓ 4 callers
Function
formatTo
(sb *strings.Builder, val ref.Val)
common/types/format.go:23
↓ 4 callers
Function
getElem
(t *testing.T, list traits.Indexer, index ref.Val)
common/types/list_test.go:867
↓ 4 callers
Function
isNumericArgType
(arg ast.Expr)
ext/math.go:906
↓ 4 callers
Method
locationByID
(id int64)
checker/checker.go:714
↓ 4 callers
Function
maybeUnwrapOptional
(t *types.Type)
checker/types.go:49
↓ 4 callers
Function
newIdent
(name string, t *exprpb.Type, v *exprpb.Constant, desc string)
checker/decls/decls.go:115
↓ 4 callers
Function
nodeAsUintValue
(node checker.AstNode, defaultVal uint64)
ext/costs.go:69
↓ 4 callers
Function
optimizerEnv
(t *testing.T)
cel/optimizer_test.go:323
↓ 4 callers
Function
parseCIDR
(raw string)
ext/network.go:453
↓ 4 callers
Method
peekLocalVar
(varName string)
checker/cost.go:456
↓ 4 callers
Method
push
(varName string, expr ast.Expr, path []string, size *SizeEstimate, entrySize *entrySizeEstimate)
checker/cost.go:380
↓ 4 callers
Function
setLimit
(id limitID, limit int)
cel/options.go:925
↓ 4 callers
Method
sizeOrUnknown
(node any)
checker/cost.go:924
↓ 4 callers
Function
testProtosEnv
testProtosEnv initializes the test environment common to all tests.
ext/protos_test.go:213
↓ 4 callers
Function
testRegexEnv
(t *testing.T, opts ...cel.EnvOption)
ext/regex_test.go:264
↓ 4 callers
Function
toFieldName
(fieldNameHandler NativeTypesFieldNameHandler, f reflect.StructField)
ext/native.go:275
↓ 4 callers
Function
uint64ToInt64Lossless
(v uint64)
common/types/overflow.go:426
↓ 4 callers
Function
visit
TODO: consider exposing a way to configure a limit for the max visit depth. It's possible that we could want to configure this on the NewExprVisitor()
common/ast/navigable.go:194
↓ 3 callers
Method
AccuIdentName
AccuIdentName reports the name of the accumulator variable to be used within a comprehension.
common/ast/factory.go:47
↓ 3 callers
Method
Adapter
Adapter returns the type adapter to be used for adapting resolved Attribute values.
interpreter/interpretable.go:89
↓ 3 callers
Method
AddLimits
AddLimits appends one or more limits to the config.
common/env/env.go:216
↓ 3 callers
Method
AddOverload
AddOverload appends a function overload ID to the ReferenceInfo.
common/ast/ast.go:489
↓ 3 callers
Method
AddOverload
AddOverload ensures that the new overload does not collide with an existing overload signature; however, if the function signatures are identical, the
common/decls/decls.go:259
↓ 3 callers
Method
AddQualifier
AddQualifier proxies the Attribute.AddQualifier method. Note, this method may mutate the current attribute state. If the desire is to clone the Attri
interpreter/interpretable.go:97
↓ 3 callers
Function
Alias
Alias associates a name with a user-defined alias. In general, Abbrevs is preferred to Alias since the names generated from the Abbrevs option are mo
common/containers/container.go:245
↓ 3 callers
Function
AllMatcher
AllMatcher returns true for all descendants of a NavigableExpr, effectively flattening them into a list. Such a result would work well with subsequen
common/ast/navigable.go:98
↓ 3 callers
Function
AuthoringPrompt
AuthoringPrompt creates a prompt template from a CEL environment for the purpose of AI-assisted authoring.
cel/prompt.go:64
↓ 3 callers
Method
CheckInterrupt
CheckInterrupt returns whether the evaluation has been interrupted.
interpreter/frame.go:181
↓ 3 callers
Method
Clone
Clone makes a shallow copy of the tracker. The different clones can be used independently from each other.
interpreter/runtimecost.go:239
↓ 3 callers
Function
CollectFileDescriptorSet
CollectFileDescriptorSet builds a file descriptor set associated with the file where the input message is declared.
common/types/pb/pb.go:245
↓ 3 callers
Function
Compile
Compile combines the policy compilation and composition steps into a single call. This generates a single CEL AST from a collection of policy express
policy/compiler.go:244
↓ 3 callers
Method
Condition
Condition returns the condition CEL expression.
policy/parser.go:318
↓ 3 callers
Method
ConfigValue
ConfigValue retrieves the value associated with the config key name, if one exists.
common/env/env.go:724
↓ 3 callers
Function
Cost
Cost estimates the cost of the parsed and type checked CEL expression.
checker/cost.go:285
↓ 3 callers
Function
CustomDecoratorV2
CustomDecoratorV2 appends an InterpreterDecoratorV2 to the program.
cel/options.go:460
↓ 3 callers
Method
DelLetFn
DelLetFn removes a function from the evaluation context. If deleting the function breaks a later expression, this function will return an error withou
repl/evaluator.go:718
↓ 3 callers
Method
Descriptor
()
test/proto2pb/test_all_types.pb.go:63
↓ 3 callers
Function
DisableDeclaration
DisableDeclaration disables the function signatures, effectively removing them from the type-check environment while preserving the runtime bindings.
cel/decls.go:293
↓ 3 callers
Function
EnableIdentEscapeSyntax
EnableIdentEscapeSyntax enables backtick (`) escaped field identifiers. This supports extended types of characters in identifiers, e.g. foo.`baz-bar`.
parser/options.go:134
↓ 3 callers
Function
Equal
Equal returns whether two proto.Message instances are equal using the following criteria: - Messages must share the same instance of the type descrip
common/types/pb/equal.go:45
↓ 3 callers
Function
ErrorAsIssues
ErrorAsIssues wraps a Golang error into a CEL common error and issue set. This is a convenience method for early returning from an expression validat
cel/env.go:972
↓ 3 callers
Method
Examples
Examples returns a list of string examples for the overload.
common/decls/decls.go:628
↓ 3 callers
Function
ExcludeOverloads
ExcludeOverloads defines an OverloadSelector which deny-lists a set of overloads by their ids.
common/decls/decls.go:214
↓ 3 callers
Method
ExecuteTest
ExecuteTest executes the test case against the provided list of programs and returns an error if the test fails. During the test execution, the interm
tools/celtest/test_runner.go:1021
↓ 3 callers
Function
ExprDeclToDeclaration
ExprDeclToDeclaration converts a protobuf CEL declaration to a CEL-native declaration, either a Variable or Function.
cel/decls.go:373
↓ 3 callers
Function
ExprToString
ExprToString converts an AST Expr node back to a string using macro call tracking metadata from source info if any macros are encountered within the e
cel/io.go:107
↓ 3 callers
Function
ExpressionSizeCodePointLimit
ExpressionSizeCodePointLimit is an option which limits the maximum code point count of an expression.
parser/options.go:90
↓ 3 callers
Function
ExpressionUnnestHeight
ExpressionUnnestHeight determines the height at which nested expressions are split into local variables within the cel.@block declaration.
policy/composer.go:35
↓ 3 callers
Function
FileDescriptorSet
FileDescriptorSet creates a Test Runner Option which adds a file descriptor set to the test runner. The file descriptor set is used to register proto
tools/celtest/test_runner.go:473
↓ 3 callers
Method
FindIdentInScope
FindIdentInScope finds the first ident Decl with a matching name in the current Scopes value, or nil if one does not exist. Note: The search is only p
checker/scopes.go:94
← previous
next →
701–800 of 7,240, ranked by callers