MCPcopy Create free account

hub / github.com/cel-expr/cel-go / functions

Functions9,178 in github.com/cel-expr/cel-go

↓ 5 callersFunctionK8sTestTagHandler
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 callersFunctionLibrary
Library returns a cel.EnvOption to configure extended functions for JWT data handling and claims inspection.
ext/security/jwt/jwt.go:51
↓ 5 callersMethodLineOffsets
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 callersFunctionMap
Map creates an expression representing a map with the given entry count, key size and value size. The estimate is the size the sizing strategy assign
common/cost/model.go:1015
↓ 5 callersFunctionMatchSubset
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 callersMethodMatches
Matches returns the list of matches associated with the rule.
policy/compiler.go:56
↓ 5 callersFunctionMaybeReverseList
MaybeReverseList attempts to reverse a traits.Lister using its underlying native slice representation, preserving the original element type. If the un
common/types/list.go:197
↓ 5 callersFunctionMaybeSliceList
MaybeSliceList attempts to sub-slice a traits.Lister using its underlying native slice representation via reflection, preserving the original element
common/types/list.go:172
↓ 5 callersFunctionMemoryObserver
MemoryObserver provides an observer that tracks runtime peak memory.
interpreter/runtimememory.go:37
↓ 5 callersFunctionMemoryTrackerSampleInterval
MemoryTrackerSampleInterval configures how frequently Sample observations compute a size. An interval of N means every Nth call to Sample performs a
common/types/memory_tracker.go:45
↓ 5 callersFunctionNetwork
Network returns a cel.EnvOption to configure extended functions for network address parsing, inspection, and CIDR range manipulation. Note: This libr
ext/network.go:132
↓ 5 callersFunctionNewExtension
NewExtension creates an Extension to be recorded on the SourceInfo.
common/ast/ast.go:545
↓ 5 callersFunctionNewInlineVariableWithAlias
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 callersFunctionNewIssues
NewIssues returns an Issues struct from a common.Errors object.
cel/env.go:1191
↓ 5 callersFunctionNewIssuesWithSourceInfo
NewIssuesWithSourceInfo returns an Issues struct from a common.Errors object with SourceInfo metatata which can be used with the `ReportErrorAtID` met
cel/env.go:1198
↓ 5 callersMethodNewSelect
NewSelect create a field traversal Expr value.
parser/macro.go:288
↓ 5 callersMethodNewStruct
NewStruct creates a struct literal expression with an optional set of field initializers.
parser/macro.go:215
↓ 5 callersMethodNewValue
(typeName string, fields map[string]ref.Val)
cel/options.go:1244
↓ 5 callersFunctionNewVariableWithDoc
NewVariableWithDoc creates a new variable declaration with usage documentation.
common/decls/decls.go:1126
↓ 5 callersFunctionNodeAsUintValue
NodeAsUintValue returns the value of a literal int node as a uint64, or the default value if the node is not a non-negative int literal.
common/cost/cost.go:473
↓ 5 callersMethodObserveExec
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:188
↓ 5 callersMethodOperandTrait
OperandTrait returns the trait mask of the first operand to the overload call, e.g. `traits.Indexer`
common/decls/decls.go:758
↓ 5 callersFunctionParseToken
ParseToken parses a JWT token string into a structured Token. Verification of the token must be performed before passing the token to CEL.
ext/security/jwt/jwt.go:393
↓ 5 callersMethodQualify
Qualify replicates the Attribute.Qualify method to permit extension and interception of object qualification.
interpreter/interpretable.go:101
↓ 5 callersFunctionRegexProgramSize
RegexProgramSize calculates the instruction count (program plan size) of a regex pattern.
common/types/regex.go:24
↓ 5 callersMethodReportErrorAtID
ReportErrorAtID reports an error at the given expression id.
policy/compiler.go:219
↓ 5 callersMethodReset
Reset clears the previously recorded expression values.
interpreter/evalstate.go:34
↓ 5 callersFunctionRetryAttempts
RetryAttempts sets the maximum number of attempts (including the first one).
cel/async/async.go:153
↓ 5 callersFunctionRetryBackoff
RetryBackoff sets the fixed backoff duration between attempts.
cel/async/async.go:160
↓ 5 callersFunctionRetryBinding
RetryBinding wraps a BlockingAsyncOp with a retry policy and returns an OverloadOpt.
cel/async/async.go:225
↓ 5 callersMethodSetDefaultVars
SetDefaultVars sets the default variables activation for the frame, composing it with any existing scope activation.
interpreter/frame.go:112
↓ 5 callersMethodSetDisableMacros
SetDisableMacros disables the macros for the library.
common/env/env.go:661
↓ 5 callersFunctionSingletonBinaryBinding
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:540
↓ 5 callersMethodSize
Size implements the traits.Sizer interface method.
common/types/list.go:648
↓ 5 callersMethodSnippet
Snippet returns a line of content and whether the line was found.
common/source.go:56
↓ 5 callersFunctionSourceInfoToProto
SourceInfoToProto serializes an ast.SourceInfo value to a protobuf SourceInfo object.
common/ast/conversion.go:529
↓ 5 callersFunctionSquare
Square creates an expression representing the square of another expression.
common/cost/model.go:765
↓ 5 callersFunctionStandardOverloadEstimatorsWithOptions
StandardOverloadEstimatorsWithOptions returns the map of FunctionEstimator instances for standard overloads, configured by the supplied options.
common/cost/standard.go:229
↓ 5 callersFunctionStrictTimestampParsing
StrictTimestampParsing controls how strictly timestamp strings and numeric timezone offsets are validated. Strict parsing is the default and is equiv
cel/options.go:1150
↓ 5 callersMethodTarget
Target returns the size of the receiver/target object, if present.
common/cost/model.go:70
↓ 5 callersFunctionTargetKey
TargetKey creates an expression referencing the key size of the receiver / target object.
common/cost/model.go:533
↓ 5 callersFunctionTestCompiler
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 callersFunctionTestSuite
TestSuite provides a reference to the test suite file (either .yaml or .textproto)
tools/celtest/test_runner.go:292
↓ 5 callersMethodToDisplayString
ToDisplayString returns the error set to a newline delimited string.
common/errors.go:84
↓ 5 callersFunctionTriggerTests
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 callersMethodType_
()
repl/parser/commands_parser.go:3576
↓ 5 callersFunctionValidateRegexProgramSizeLimit
ValidateRegexProgramSizeLimit ensures that regex pattern literals do not exceed the specified regex program size limit.
cel/validator.go:269
↓ 5 callersFunctionValidateTimestampLiterals
ValidateTimestampLiterals ensures that timestamp literal arguments are valid immediately after type-check.
cel/validator.go:231
↓ 5 callersFunctionWrapOnColumn
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:678
↓ 5 callersMethodaddIndent
()
common/debug/debug.go:301
↓ 5 callersMethodaddPath
addPath associates an expression ID with its path.
common/cost/estimator.go:1112
↓ 5 callersMethodappendLine
()
common/debug/debug.go:296
↓ 5 callersMethodcheckMapValid
(ctx ParserContext, id int64, node *yaml.Node)
policy/parser.go:967
↓ 5 callersMethodcheckRecursion
checkRecursion returns true and trips the recursion limit if depth exceeds the configured limit. The parser bounds two depths separately against maxR
parser/pratt_parser.go:175
↓ 5 callersMethodclearPlan
Reset plan if we need to recompile based on a dependency change.
repl/evaluator.go:317
↓ 5 callersFunctioncompile
(t testing.TB, name string, policy *Policy, envOpts []cel.EnvOption, compilerOpts []CompilerOption)
policy/compiler_test.go:506
↓ 5 callersFunctioncompileOrError
(t testing.TB, env *Env, expr string)
cel/cel_test.go:5221
↓ 5 callersFunctiondoubleToInt64Lossless
(v float64)
common/types/overflow.go:410
↓ 5 callersMethodexpr
expr returns the output expression for the step.
policy/composer.go:471
↓ 5 callersMethodgetByID
(callID int64)
interpreter/async.go:250
↓ 5 callersFunctiongetCELFuzzEnv
getCELFuzzEnv creates an environment for running under AddressSanitizer without timing out.
fuzzing/fuzz_env.go:23
↓ 5 callersMethodgetLocation
(id int64)
parser/helper.go:224
↓ 5 callersFunctionisDirectIface
isDirectIface determines whether a type's values fit directly into an interface's data word according to Go runtime conventions (pointers, single-poin
common/types/provider.go:1175
↓ 5 callersFunctionjsonParseValue
(adapter types.Adapter, provider types.Provider, str string, targetType ref.Type)
ext/encoders.go:715
↓ 5 callersFunctionjsonUnmarshaler
(data []byte)
common/env/io.go:81
↓ 5 callersFunctionlabelErrNode
(id int64, val ref.Val)
interpreter/interpretable.go:2249
↓ 5 callersFunctionmacroTargetMatchesNamespace
(ns string, target ast.Expr)
ext/guards.go:62
↓ 5 callersMethodmakeToken
(kind tokenKind, start, end int32)
parser/lexer.go:252
↓ 5 callersMethodmatchesRuntimeSignature
matchesRuntimeSignature indicates whether the argument types are runtime assiganble to the overload's expected arguments.
common/decls/decls.go:959
↓ 5 callersFunctionmissingKey
(missing ref.Val)
interpreter/attributes.go:1656
↓ 5 callersFunctionnewAsyncCallStateTracker
()
interpreter/async.go:135
↓ 5 callersFunctionnewAsyncGate
(maxConcurrency int, completions chan<- int64)
interpreter/async.go:469
↓ 5 callersMethodnewLiteralString
(ctx any, value string)
parser/helper.go:60
↓ 5 callersFunctionnewSharedRegistryPair
(t *testing.T, opts ...RegistryOption)
common/types/provider_test.go:89
↓ 5 callersMethodparseBinaryAndTernary
(minPrec int)
parser/pratt_parser.go:482
↓ 5 callersFunctionparseIPAddr
(raw string)
ext/network.go:494
↓ 5 callersFunctionrefQualify
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:1574
↓ 5 callersMethodremoveIndent
()
common/debug/debug.go:305
↓ 5 callersFunctionsanitizeProtoName
sanitizeProtoName strips the leading '.' from the proto message name.
common/types/pb/file.go:126
↓ 5 callersMethodsetReference
(e ast.Expr, r *ast.ReferenceInfo)
checker/checker.go:680
↓ 5 callersMethodsizeOrUnknown
(node ast.Expr)
common/cost/estimator.go:1155
↓ 5 callersFunctiontestContainer
(name string)
interpreter/interpreter_test.go:2651
↓ 5 callersFunctiontestMathEnv
(t *testing.T, opts ...cel.EnvOption)
ext/math_test.go:662
↓ 5 callersFunctiontoParserHelper
(meh MacroExprHelper)
cel/macro.go:582
↓ 5 callersFunctiontypedArgNode
typedArgNode returns an AstNode with the given checked type and size estimate.
common/cost/length_test.go:26
↓ 5 callersFunctionuint64ToInt64Lossless
(v uint64)
common/types/overflow.go:426
↓ 5 callersMethodvalToRefVal
(v V)
common/types/map.go:626
↓ 5 callersFunctionvisit
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 callersMethodAddLimits
AddLimits appends one or more limits to the config.
common/env/env.go:216
↓ 4 callersFunctionAllMatcher
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
↓ 4 callersMethodArgCount
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 callersMethodCallID
CallID returns the unique identifier for this async call invocation.
interpreter/async.go:56
↓ 4 callersMethodCandidateVariableNames
CandidateVariableNames returns the possible namespaced variable names for this Attribute in the CEL namespace resolution order.
interpreter/attributes.go:123
↓ 4 callersMethodClearMacroCall
ClearMacroCall clears the macro at the given expression id.
cel/optimizer.go:306
↓ 4 callersFunctionCompile
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:258
↓ 4 callersFunctionCompileRegexConstants
CompileRegexConstants compiles regex pattern string constants at program creation time and reports any regex pattern compile errors.
interpreter/interpreter.go:232
↓ 4 callersFunctionCompileRule
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:271
↓ 4 callersMethodCompileSource
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:579
↓ 4 callersFunctionConfigToJSON
ConfigToJSON returns the config serialized to JSON Provided as a convenience wrapper around a tested JSON Marshaler.
common/env/io.go:513
↓ 4 callersMethodConfigValue
ConfigValue retrieves the value associated with the config key name, if one exists.
common/env/env.go:726
← previousnext →801–900 of 9,178, ranked by callers