MCPcopy Create free account

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

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

↓ 1 callersMethodpushIterKey
pushIterKey pushes the iteration key or index variable for a comprehension onto the scope stack.
common/cost/estimator.go:261
↓ 1 callersMethodpushIterSingle
pushIterSingle pushes a single iteration variable (items for list, keys for map) onto the scope stack.
common/cost/estimator.go:300
↓ 1 callersMethodpushIterValue
pushIterValue pushes the iteration value variable for a comprehension onto the scope stack.
common/cost/estimator.go:281
↓ 1 callersMethodpushLocalVars
(names ...string)
interpreter/planner.go:951
↓ 1 callersFunctionqualifiersEqual
(a, b any)
common/types/unknown.go:64
↓ 1 callersFunctionrandSeq
(n int)
common/cost/cost_test.go:617
↓ 1 callersFunctionrationalOf
rationalOf returns the simplest rational p/q whose float64 value is f, found from the continued fraction expansion of f. A decimal factor such as 0.1
common/cost/helper.go:251
↓ 1 callersMethodreceiverCallOrMacro
(exprID int64, function string, target ast.Expr, args ...ast.Expr)
parser/antlr_parser.go:865
↓ 1 callersMethodreceiverCallOrMacro
(exprID int64, function string, target ast.Expr, args ...ast.Expr)
parser/pratt_parser.go:350
↓ 1 callersFunctionrecoverOriginalSource
(r *CompiledRule)
policy/composer.go:112
↓ 1 callersFunctionreduceHeight
(heights map[int64]int, e ast.NavigableExpr, amount int)
policy/composer.go:667
↓ 1 callersMethodrefEquiv
(r1, r2 *ReferenceInfo)
common/ast/equiv.go:413
↓ 1 callersFunctionrefValueToExprValue
(refVal ref.Val)
tools/celtest/test_runner.go:828
↓ 1 callersFunctionrefValueToExprValue
(res ref.Val)
conformance/conformance_test.go:132
↓ 1 callersMethodreferenceRedefinition
(id int64, l common.Location, ex ast.Expr, prev, next *ast.ReferenceInfo)
checker/errors.go:80
↓ 1 callersFunctionreferences
references reports whether pred holds for the expression or any of its operands.
common/cost/validate.go:115
↓ 1 callersFunctionregReplaceN
(args ...ref.Val)
ext/regex.go:179
↓ 1 callersFunctionregexCostAllowlistV0
regexCostAllowlistV0 returns the legacy violations for the regex library under ModelVersion0.
common/cost/cost_bounds_test.go:640
↓ 1 callersFunctionregexExprs
regexExprs returns the regex extension calls to check.
common/cost/cost_bounds_test.go:367
↓ 1 callersFunctionregexExtractAllCostModel
regexExtractAllCostModel models regex.extractAll: it returns parts of the target, sized as the parts of a split.
ext/regex.go:414
↓ 1 callersFunctionregexExtractCostModel
regexExtractCostModel models regex.extract: it searches the target, and returns an optional holding the first match or capture group, a part of the ta
ext/regex.go:404
↓ 1 callersFunctionregexReplaceCostModel
regexReplaceCostModel models regex.replace: it may expand each of the at most n + 1 matches into the replacement, whose capture group references may e
ext/regex.go:424
↓ 1 callersFunctionregisterFileDescriptor
(t *testing.T, pbdb *Db, pbMsg proto.Message)
common/types/pb/file_test.go:201
↓ 1 callersFunctionregisterFileSet
(reg protoTypeRegistry, fileSet *descpb.FileDescriptorSet)
cel/options.go:486
↓ 1 callersFunctionregisterMessages
(fds *descpb.FileDescriptorSet)
tools/celtest/test_runner.go:496
↓ 1 callersFunctionregisterTypeItem
(r *Registry, t any)
common/types/provider.go:926
↓ 1 callersMethodregisterUnnestVariable
registerUnnestVariable creates an entry for a variable name within the cel.@block used to unnest a deeply nested logical branch or logical operator.
policy/composer.go:438
↓ 1 callersMethodregisterVariable
registerVariable creates an entry for a variable name within the cel.@block used to enumerate variables within composed policy expression.
policy/composer.go:304
↓ 1 callersFunctionremoveIneligibleSubExprs
(e ast.NavigableExpr, unnestMap map[int64]bool)
policy/composer.go:641
↓ 1 callersFunctionreplace
(str, old, new string)
ext/strings.go:731
↓ 1 callersFunctionreplaceN
(str, old, new string, n int64)
ext/strings.go:735
↓ 1 callersFunctionreplaceStrValidator
(target string, re *regexp.Regexp, match []int, replacement string)
ext/regex.go:225
↓ 1 callersFunctionreport
report prints out the result of evaluation in human-friendly terms.
codelab/codelab.go:196
↓ 1 callersFunctionreport
report prints out the result of evaluation in human-friendly terms.
codelab/solution/codelab.go:437
↓ 1 callersFunctionreportCoverage
reportCoverage reports the coverage information for the provided programs. - For the node coverage, the coverage is reported as a percentage of the nu
tools/celtest/test_coverage_reporter.go:34
↓ 1 callersMethodreset
reset clears any state associated with folder evaluation.
interpreter/interpretable.go:2153
↓ 1 callersMethodresolve
resolve determines which declared overload the runtime arguments satisfy and resolves its implementation from the activation.
interpreter/interpretable.go:982
↓ 1 callersMethodresolveCompletionBufferSize
resolveCompletionBufferSize returns the size of the async completion channel. When unset, it defaults to the effective launch concurrency so that all
cel/program.go:610
↓ 1 callersMethodresolveFn
Try to normalize a defined function name as either a namespaced function or a receiver call.
repl/evaluator.go:456
↓ 1 callersFunctionresolveFunction
resolveFunction performs the lookup the way an evaluation does: the activation which supplies the bindings is located once, then consulted by name.
interpreter/activation_test.go:217
↓ 1 callersMethodresolveFunction
resolveFunction determines the call target, function name, and overload name from a given Expr value. The resolveFunction resolves ambiguities where
interpreter/planner.go:838
↓ 1 callersMethodresolveOverload
( call ast.Expr, fn *decls.FunctionDecl, target ast.Expr, args []ast.Expr)
checker/checker.go:347
↓ 1 callersMethodresolveOverloadOrError
( e ast.Expr, fn *decls.FunctionDecl, target ast.Expr, args []ast.Expr)
checker/checker.go:333
↓ 1 callersMethodresolveTypeIdent
resolveTypeIdent returns a Decl proto for typeName as an identifier in the Env. Returns nil if no such identifier is found in the Env.
checker/env.go:209
↓ 1 callersMethodresolveTypeName
resolveTypeName takes a qualified string constructed at parse time, applies the proto namespace resolution rules to it in a scan over possible matchin
interpreter/planner.go:821
↓ 1 callersFunctionreverse
(str string)
ext/strings.go:785
↓ 1 callersFunctionreverseList
(adapt types.Adapter, list traits.Lister)
ext/lists.go:511
↓ 1 callersMethodrewritePresenceExpr
rewritePresenceExpr converts the inlined expression, when it occurs within a has() macro, to type-safe expression appropriate for the inlined type, if
cel/inlining.go:154
↓ 1 callersFunctionroundScale
roundScale scales e by f and rounds before any outer multiplication, reproducing the version 0 rounding of products of scaled factors.
common/cost/standard.go:217
↓ 1 callersFunctionrunCostBoundsCase
runCostBoundsCase compiles, estimates, and evaluates a single case. An error is returned only when the case itself is malformed. Cost violations are
common/cost/cost_bounds_test.go:132
↓ 1 callersFunctionrunOptionsBenchmark
(b *testing.B, expr string, vars []*decls.VariableDecl, in any, sc optionsScenario)
interpreter/runtimememory_test.go:444
↓ 1 callersFunctionrunTestSuite
(t *testing.T, fullDirPath, dir, testSuiteFile, policyFile, suffix string)
conformance/policy/policy_conformance_test.go:213
↓ 1 callersFunctionsafeSetFieldByIndex
(v reflect.Value, index []int)
common/types/native.go:786
↓ 1 callersMethodscanNextSignificantToken
()
parser/pratt_parser.go:206
↓ 1 callersFunctionscanOptTargets
scanOptTargets walks the AST once and reports whether the Optimize() decorator (needOpt) and the regex-constant compiler (needRegex) have any target n
cel/program.go:287
↓ 1 callersMethodsetCheckerOrError
setCheckerOrError sets the checker.Env or error state in a concurrency-safe manner
cel/env.go:1141
↓ 1 callersMethodsetFunction
setFunction adds the function Decl to the Env. Adds a function decl if one doesn't already exist, then adds all overloads from the Decl. If overload o
checker/env.go:269
↓ 1 callersMethodsetOption
setOption sets a number of options on the environment. returns an error if any of them fail.
repl/evaluator.go:1129
↓ 1 callersMethodsetTokenLocation
(id int64, tok token)
parser/helper.go:208
↓ 1 callersFunctionsetsCostModel
(id string, costFactor float64)
ext/sets.go:227
↓ 1 callersFunctionsetsEquivalent
(listA, listB ref.Val)
ext/sets.go:219
↓ 1 callersFunctionsetsExprs
setsExprs returns the sets extension calls to check.
common/cost/cost_bounds_test.go:386
↓ 1 callersFunctionsetsIntersects
(listA, listB ref.Val)
ext/sets.go:193
↓ 1 callersFunctionsetupTests
()
tools/celtest/test_runner_test.go:43
↓ 1 callersFunctionshouldSkipTest
(s string)
conformance/conformance_test.go:120
↓ 1 callersFunctionshouldSkipTest
(s string)
conformance/policy/policy_conformance_test.go:98
↓ 1 callersFunctionsimplePkgAlias
(pkgPath string)
common/types/native.go:1589
↓ 1 callersFunctionsingularFieldDescToCELType
(field *pb.FieldDescription)
common/types/provider.go:983
↓ 1 callersFunctionsizeEstimate
(estimator cost.Estimator, t cost.AstNode)
common/cost/cost_test.go:735
↓ 1 callersFunctionsizeOrUnknown
sizeOrUnknown returns the size estimate computed for the node, or an unknown size if the node size could not be determined at check time.
cel/library.go:764
↓ 1 callersFunctionslice
(adapt types.Adapter, list traits.Lister, start, end types.Int)
ext/lists.go:524
↓ 1 callersFunctionsliceFieldGetter
(t *NativeType, refField reflect.StructField, offset uintptr, expectedPtrTyp, expectedStructTyp unsafe.Pointer
common/types/native.go:943
↓ 1 callersFunctionsortList
(adapt types.Adapter, list traits.Lister)
ext/lists.go:579
↓ 1 callersFunctionsourceToYAML
(src *Source, docNode *yaml.Node)
policy/parser.go:608
↓ 1 callersFunctionsourceWithExtension
(info *ast.SourceInfo, ext ast.Extension)
common/ast/conversion_test.go:730
↓ 1 callersFunctionsplit
(str, sep string)
ext/strings.go:739
↓ 1 callersFunctionsplitImpl
splitImpl splits a string into a list of strings. Normalizes extracted comments (trim common prefix whitespace and extra trailing newlines).
cel/prompt.go:35
↓ 1 callersFunctionsplitN
(str, sep string, n int64)
ext/strings.go:743
↓ 1 callersFunctionstringCharAtCostModel
stringCharAtCostModel models charAt: it scans the receiver and returns a single code point, which is at most 4 UTF-8 bytes under the aggregate strateg
ext/strings.go:911
↓ 1 callersFunctionstringFixedTransformCostModel
(id string)
ext/strings.go:925
↓ 1 callersFunctionstringReplaceCostModel
stringReplaceCostModel models replace: it searches the receiver for the needle and builds the result. Without a match the result is the receiver, and
ext/strings.go:997
↓ 1 callersFunctionstringSearchCostModel
(id string)
ext/strings.go:919
↓ 1 callersFunctionstringSplitCostModel
stringSplitCostModel models split: it scans the receiver and allocates the parts.
ext/strings.go:1018
↓ 1 callersFunctionstringSubstringCostModel
stringSubstringCostModel models s.substring(start): it drops at least start units of the receiver, and at most 4 times as many under the aggregate str
ext/strings.go:942
↓ 1 callersFunctionstringSubstringRangeCostModel
stringSubstringRangeCostModel models s.substring(start, end): the result has end - start code points, sized between that length and 4 times it under t
ext/strings.go:956
↓ 1 callersFunctionstringTrimCostModel
(id string)
ext/strings.go:932
↓ 1 callersFunctionstringsCostAllowlistV0
stringsCostAllowlistV0 returns the legacy violations for the strings library under ModelVersion0.
common/cost/cost_bounds_test.go:629
↓ 1 callersFunctionstringsExprs
stringsExprs returns the string extension calls to check. Custom cost functions start at StringsVersion(5); earlier versions charge a fixed call cost
common/cost/cost_bounds_test.go:337
↓ 1 callersFunctionstripWhitespace
(a string)
test/compare.go:33
↓ 1 callersFunctionsubstituteParams
(m *mapping, typeParams []*types.Type, typeParamToDyn bool)
checker/types.go:342
↓ 1 callersFunctionsubstr
(str string, start int64)
ext/strings.go:747
↓ 1 callersFunctionsubstrRange
(str string, start, end int64)
ext/strings.go:755
↓ 1 callersFunctionsubtractDurationChecked
subtractDurationChecked performs subtraction with overflow detection of two time.Durations. If the operation fails due to overflow the error return v
common/types/overflow.go:174
↓ 1 callersFunctionsubtractTimeChecked
subtractTimeChecked performs subtraction with overflow detection of two time.Time. If the operation fails due to overflow the error return value will
common/types/overflow.go:250
↓ 1 callersFunctionsubtractTimeDurationChecked
subtractTimeDurationChecked performs subtraction with overflow detection of a time.Time and time.Duration. If the operation fails due to overflow the
common/types/overflow.go:289
↓ 1 callersFunctionsubtractUint64Checked
subtractUint64Checked performs subtraction with overflow detection of two uint64 values. If the operation fails due to overflow the error return valu
common/types/overflow.go:123
↓ 1 callersMethodsyntaxError
(l common.Location, message string)
parser/errors.go:35
↓ 1 callersFunctiontemplatedOverloads
(types []*cel.Type, template func(t *cel.Type) cel.FunctionOpt)
ext/lists.go:732
↓ 1 callersFunctiontestActivation
(t *testing.T, in any)
interpreter/prune_test.go:583
↓ 1 callersFunctiontestEnvProto
()
tools/compiler/compiler_test.go:114
← previousnext →3,501–3,600 of 9,178, ranked by callers