Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cel-expr/cel-go
/ functions
Functions
7,546 in github.com/cel-expr/cel-go
⨍
Functions
7,546
◇
Types & classes
876
↓ 5 callers
Method
GetArgs
GetArgs returns the args token list.
repl/parser/commands_parser.go:2268
↓ 5 callers
Method
GetOps
GetOps returns the ops token list.
repl/parser/commands_parser.go:4642
↓ 5 callers
Method
GetOpt
GetOpt returns the opt token.
repl/parser/commands_parser.go:9276
↓ 5 callers
Method
GetOrDefault
(name string, value any)
cel/validator.go:156
↓ 5 callers
Method
GetTok
()
parser/gen/cel_parser.go:5901
↓ 5 callers
Method
HasFeature
HasFeature checks whether the environment enables the given feature flag, as enumerated in options.go.
cel/env.go:624
↓ 5 callers
Method
HasLibrary
HasLibrary returns whether a specific SingletonLibrary has been configured in the environment.
cel/env.go:630
↓ 5 callers
Function
InterruptCheckFrequency
InterruptCheckFrequency configures the number of iterations within a comprehension to evaluate before checking whether the function evaluation has bee
cel/options.go:743
↓ 5 callers
Method
IsAssignableRuntimeType
IsAssignableRuntimeType determines whether the current type is runtime assignable from the input runtimeType. At runtime, parameterized types are era
common/types/types.go:328
↓ 5 callers
Method
IsLocalVariable
(name string)
interpreter/interpreter.go:119
↓ 5 callers
Method
IsNonStrict
IsNonStrict returns whether the overload accepts errors and unknown values as arguments.
common/decls/decls.go:702
↓ 5 callers
Function
JSONFieldNames
JSONFieldNames supports accessing protocol buffer fields by json-name. Enabling JSON field name support will create a copy of the types.Registry with
cel/options.go:454
↓ 5 callers
Function
K8sTestTagHandler
K8sTestTagHandler returns a TagVisitor which handles custom policy tags used in K8s policies. This is a helper function to be used in tests.
policy/test_tag_handler_k8s.go:23
↓ 5 callers
Method
LineOffsets
LineOffsets gives the character offsets at which lines occur. The zero-th entry should refer to the break between the first and second line, or EOF if
common/source.go:37
↓ 5 callers
Function
MatchSubset
MatchSubset applies an ExprMatcher to a list of NavigableExpr values and their descendants, producing a subset of NavigableExpr values which match.
common/ast/navigable.go:122
↓ 5 callers
Method
Matches
Matches returns the list of matches associated with the rule.
policy/compiler.go:55
↓ 5 callers
Function
MaxRecursionDepth
MaxRecursionDepth limits the maximum depth the parser will attempt to parse the expression before giving up.
parser/options.go:38
↓ 5 callers
Method
MultiplyByCost
MultiplyByCost multiplies by the cost and returns the product. If multiply would result in an uint64 overflow, the result is math.MaxUint64.
checker/cost.go:143
↓ 5 callers
Function
NewDispatcher
NewDispatcher returns an empty Dispatcher instance.
interpreter/dispatcher.go:36
↓ 5 callers
Function
NewErrWithNodeID
NewErrWithNodeID creates a new Err described by the format string and args. TODO: Audit the use of this function and standardize the error messages an
common/types/err.go:73
↓ 5 callers
Function
NewExtensionVersion
NewExtensionVersion creates a new extension version with a major, minor version.
common/ast/ast.go:557
↓ 5 callers
Function
NewFunctionReference
NewFunctionReference creates a ReferenceInfo instance for a set of function overloads.
common/ast/ast.go:488
↓ 5 callers
Function
NewGlobalMacro
NewGlobalMacro creates a Macro for a global function with the specified arg count.
parser/macro.go:48
↓ 5 callers
Function
NewHierarchicalActivation
NewHierarchicalActivation takes two activations and produces a new one which prioritizes resolution in the child first and parent(s) second.
interpreter/activation.go:164
↓ 5 callers
Function
NewInlineVariableWithAlias
NewInlineVariableWithAlias declares a variable name to be replaced by a checked expression. If the variable occurs more than once, the provided alias
cel/inlining.go:62
↓ 5 callers
Function
NewInterpreter
NewInterpreter builds an Interpreter from a Dispatcher and TypeProvider which will be used throughout the Eval of all Interpretable instances generate
interpreter/interpreter.go:240
↓ 5 callers
Function
NewIssuesWithSourceInfo
NewIssuesWithSourceInfo returns an Issues struct from a common.Errors object with SourceInfo metatata which can be used with the `ReportErrorAtID` met
cel/env.go:1022
↓ 5 callers
Method
NewMap
NewMap creates an Expr value representing a map literal expression
common/ast/factory.go:58
↓ 5 callers
Function
NewRefValMap
NewRefValMap returns a specialized traits.Mapper with CEL valued keys and values.
common/types/map.go:61
↓ 5 callers
Function
NewRuleComposer
NewRuleComposer creates a rule composer which stitches together rules within a policy into a single CEL expression.
policy/composer.go:47
↓ 5 callers
Method
NewSelect
NewSelect create a field traversal Expr value.
parser/macro.go:288
↓ 5 callers
Method
NewStruct
NewStruct creates a struct literal expression with an optional set of field initializers.
parser/macro.go:215
↓ 5 callers
Function
NewVariableWithDoc
NewVariableWithDoc creates a new variable declaration with usage documentation.
common/decls/decls.go:1028
↓ 5 callers
Method
OffsetLocation
OffsetLocation returns the Location of the expression identifier.
parser/macro.go:291
↓ 5 callers
Method
OverloadID
OverloadID returns the overload id associated with the function specialization. Overload ids are stable across language boundaries and can be treated
interpreter/interpretable.go:126
↓ 5 callers
Method
RegisterDescriptor
RegisterDescriptor registers the contents of a protocol buffer `FileDescriptor`.
common/types/ref/provider.go:70
↓ 5 callers
Method
ReportErrorAtID
ReportErrorAtID reports an error at the given expression id.
policy/compiler.go:205
↓ 5 callers
Method
Reset
Reset clears the previously recorded expression values.
interpreter/evalstate.go:34
↓ 5 callers
Function
RetryAttempts
RetryAttempts sets the maximum number of attempts (including the first one).
cel/async/async.go:153
↓ 5 callers
Function
RetryBackoff
RetryBackoff sets the fixed backoff duration between attempts.
cel/async/async.go:160
↓ 5 callers
Function
RetryBinding
RetryBinding wraps a BlockingAsyncOp with a retry policy and returns an OverloadOpt.
cel/async/async.go:225
↓ 5 callers
Method
SetDisableMacros
SetDisableMacros disables the macros for the library.
common/env/env.go:659
↓ 5 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
common/decls/decls.go:509
↓ 5 callers
Method
Size
Size implements the traits.Sizer interface method.
common/types/list.go:479
↓ 5 callers
Method
Snippet
Snippet returns a line of content and whether the line was found.
common/source.go:56
↓ 5 callers
Function
TestCompiler
TestCompiler returns a TestRunnerOption which configures the test runner with a compiler created using the set of compiler options.
tools/celtest/test_runner.go:451
↓ 5 callers
Function
TestSuite
TestSuite provides a reference to the test suite file (either .yaml or .textproto)
tools/celtest/test_runner.go:292
↓ 5 callers
Method
ToConfig
ToConfig converts the internal configuration of an ASTValidator into an env.Validator instance which minimally must include the validator name, but ma
cel/validator.go:151
↓ 5 callers
Method
ToDisplayString
ToDisplayString returns the error set to a newline delimited string.
common/errors.go:84
↓ 5 callers
Function
TriggerTests
TriggerTests triggers tests for a CEL policy, expression or checked expression with the provided set of options. The options can be used to: - configu
tools/celtest/test_runner.go:141
↓ 5 callers
Method
Type_
()
repl/parser/commands_parser.go:3576
↓ 5 callers
Method
Union
Union returns a SizeEstimate that encompasses both input the SizeEstimate.
checker/cost.go:151
↓ 5 callers
Method
Value
Value implements ref.Val.Value.
common/types/string.go:189
↓ 5 callers
Method
addIndent
()
common/debug/debug.go:301
↓ 5 callers
Method
appendLine
()
common/debug/debug.go:296
↓ 5 callers
Function
attrQualify
attrQualify performs a qualification using the result of an attribute evaluation.
interpreter/attributes.go:1339
↓ 5 callers
Function
attrQualifyIfPresent
attrQualifyIfPresent conditionally performs the qualification of the result of attribute is present on the target object.
interpreter/attributes.go:1353
↓ 5 callers
Method
checkMapValid
(ctx ParserContext, id int64, node *yaml.Node)
policy/parser.go:911
↓ 5 callers
Method
clearPlan
Reset plan if we need to recompile based on a dependency change.
repl/evaluator.go:317
↓ 5 callers
Function
compile
(t testing.TB, name string, policy *Policy, envOpts []cel.EnvOption, compilerOpts []CompilerOption)
policy/compiler_test.go:509
↓ 5 callers
Function
compile
(t testing.TB, env *Env, expr string)
cel/cel_test.go:4097
↓ 5 callers
Function
compileOrError
(t testing.TB, env *Env, expr string)
cel/cel_test.go:4106
↓ 5 callers
Function
estimateListCallWithDirectCost
estimateListCallWithDirectCost computes cost using a pre-calculated CostEstimate and a separate result size estimate.
ext/lists.go:842
↓ 5 callers
Function
estimateStringScan
(sz checker.SizeEstimate)
ext/costs.go:35
↓ 5 callers
Method
getByID
(callID int64)
interpreter/async.go:245
↓ 5 callers
Function
macroTargetMatchesNamespace
(ns string, target ast.Expr)
ext/guards.go:62
↓ 5 callers
Function
missingKey
(missing ref.Val)
interpreter/attributes.go:1450
↓ 5 callers
Function
newAsyncCallStateTracker
()
interpreter/async.go:130
↓ 5 callers
Function
newAsyncGate
(maxConcurrency int, completions chan<- int64)
interpreter/async.go:464
↓ 5 callers
Function
nodeAsUintValue
(node checker.AstNode, defaultVal uint64)
ext/costs.go:69
↓ 5 callers
Function
parseIPAddr
(raw string)
ext/network.go:519
↓ 5 callers
Function
program
(t testing.TB, tst *testCase, opts ...PlannerOption)
interpreter/interpreter_test.go:2424
↓ 5 callers
Function
refQualify
refQualify attempts to convert the value to a CEL value and then uses reflection methods to try and apply the qualifier with the option to presence te
interpreter/attributes.go:1368
↓ 5 callers
Method
removeIndent
()
common/debug/debug.go:305
↓ 5 callers
Function
sanitizeProtoName
sanitizeProtoName strips the leading '.' from the proto message name.
common/types/pb/file.go:126
↓ 5 callers
Method
setEntrySize
(e ast.Expr, size *entrySizeEstimate)
checker/cost.go:970
↓ 5 callers
Method
setReference
(e ast.Expr, r *ast.ReferenceInfo)
checker/checker.go:684
↓ 5 callers
Function
testContainer
(name string)
interpreter/interpreter_test.go:2419
↓ 5 callers
Function
testMathEnv
(t *testing.T, opts ...cel.EnvOption)
ext/math_test.go:662
↓ 5 callers
Function
toParserHelper
(meh MacroExprHelper)
cel/macro.go:582
↓ 5 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:217
↓ 4 callers
Method
AddExtension
AddExtension adds an extension record into the SourceInfo.
common/ast/ast.go:461
↓ 4 callers
Method
AddFunctions
AddFunctions adds one or more functions to the config.
common/env/env.go:180
↓ 4 callers
Method
ArgCount
ArgCount for the function call. When the macro is a var-arg style macro, the return value will be zero, but the MacroKey will contain a `*` where the
parser/macro.go:109
↓ 4 callers
Method
CallID
CallID returns the unique identifier for this async call invocation.
interpreter/async.go:58
↓ 4 callers
Method
CandidateVariableNames
CandidateVariableNames returns the possible namespaced variable names for this Attribute in the CEL namespace resolution order.
interpreter/attributes.go:123
↓ 4 callers
Method
ClearMacroCall
ClearMacroCall clears the macro at the given expression id.
cel/optimizer.go:305
↓ 4 callers
Function
CompileRegexConstants
CompileRegexConstants compiles regex pattern string constants at program creation time and reports any regex pattern compile errors.
interpreter/interpreter.go:226
↓ 4 callers
Function
CompileRule
CompileRule creates a compiled rules from the policy which contains a set of compiled variables and match statements. The compiled rule defines an exp
policy/compiler.go:257
↓ 4 callers
Method
CompileSource
CompileSource combines the Parse and Check phases CEL program compilation to produce an Ast and associated issues. If an error is encountered during
cel/env.go:499
↓ 4 callers
Method
Compose
Compose stitches together a set of expressions within a CompiledRule into a single CEL ast.
policy/composer.go:74
↓ 4 callers
Method
ComputedSize
ComputedSize returns a size estimate of the AstNode derived from information available in the CEL expression. For constants and inline list and map de
checker/cost.go:73
↓ 4 callers
Function
Constant
Constant creates an instances of an identifier declaration with a variable name, type, and value.
cel/decls.go:136
↓ 4 callers
Function
ConstantToVal
ConstantToVal converts a protobuf Constant to a CEL-native ref.Val.
common/ast/conversion.go:664
↓ 4 callers
Function
Copy
Copy creates a deep copy of the Expr and SourceInfo values in the input AST. Copies of the Expr value are generated using an internal default ExprFac
common/ast/ast.go:133
↓ 4 callers
Function
CustomDecoratorV2
CustomDecoratorV2 appends an InterpreterDecoratorV2 to the program.
cel/options.go:472
↓ 4 callers
Method
DeclaredTypeName
DeclaredTypeName indicates the fully qualified and parameterized type-check type name.
common/types/types.go:351
↓ 4 callers
Method
DescribeEnum
DescribeEnum takes a qualified enum name and returns an `EnumDescription` if it exists in the `pb.Db`.
common/types/pb/pb.go:226
↓ 4 callers
Function
DiffMessage
DiffMessage creates a diff dump message for test failures.
test/compare.go:29
↓ 4 callers
Function
DisableDeclaration
DisableDeclaration indicates that the function declaration should be disabled, but the runtime function binding should be provided. Marking a function
common/decls/decls.go:472
← previous
next →
601–700 of 7,546, ranked by callers