MCPcopy Create free account

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

Functions7,240 in github.com/cel-expr/cel-go

↓ 2 callersFunctionPruneAst
TODO Consider having a separate walk of the AST that finds common subexpressions. This can be called before or after constant folding to find common s
interpreter/prune.go:69
↓ 2 callersMethodQualId
()
repl/parser/commands_parser.go:3210
↓ 2 callersMethodQualifierValueEquals
QualifierValueEquals returns true if the input value is equal to the value held in the Qualifier.
interpreter/attribute_patterns.go:138
↓ 2 callersMethodQualifiers
Qualifiers returns the list of qualifiers associated with the Attribute.
interpreter/attributes.go:126
↓ 2 callersMethodQualify
Qualify performs a qualification, e.g. field selection, on the input object and returns the value of the access and whether the value was set. A non-n
interpreter/attributes.go:80
↓ 2 callersMethodRangeList
RangeList iterates over the list and calls the provided function for each element. If the function returns false, the iteration will stop.
policy/yaml.go:31
↓ 2 callersFunctionReferenceInfoToProto
ReferenceInfoToProto converts a ReferenceInfo instance to a protobuf Reference suitable for serialization.
common/ast/conversion.go:612
↓ 2 callersFunctionRegexVersion
RegexVersion configures the version of the Regex library definitions to use. See [Regex] for supported values.
ext/regex.go:118
↓ 2 callersMethodRegisterType
RegisterType registers a type value with the provider which ensures the provider is aware of how to map the type to an identifier. If the `ref.Type`
common/types/provider.go:383
↓ 2 callersMethodReportErrorAtID
ReportErrorAtID records an error at a source location and expression id.
common/errors.go:55
↓ 2 callersMethodReset
Reset clears the previously recorded expression values.
interpreter/evalstate.go:34
↓ 2 callersMethodResultType
ResultType returns the output type of the expression if the Ast has been type-checked, else returns chkdecls.Dyn as the parse step cannot infer the ty
cel/env.go:91
↓ 2 callersMethodSetCondition
SetCondition sets the CEL condition for the match.
policy/parser.go:359
↓ 2 callersMethodSetExpression
SetExpression sets the variable expression.
policy/parser.go:293
↓ 2 callersMethodSetOutput
SetOutput sets the output expression for the match.
policy/parser.go:364
↓ 2 callersMethodSetRule
SetRule sets the rule for the match.
policy/parser.go:374
↓ 2 callersMethodSetType
SetType sets the type of the expression node at the given id.
common/ast/ast.go:59
↓ 2 callersFunctionSetsVersion
SetsVersion sets the library version for set extensions.
ext/sets.go:90
↓ 2 callersFunctionSingletonFunctionBinding
SingletonFunctionBinding creates a singleton function definition to be used with all function overloads. Note, this approach works well if operand is
cel/decls.go:287
↓ 2 callersMethodSize
Size implements the traits.Sizer interface method.
common/types/list.go:268
↓ 2 callersMethodSort
Sort is a convenience method: x.Sort() calls Sort(x).
cel/folding_test.go:921
↓ 2 callersMethodSort
Sort is a convenience method: x.Sort() calls Sort(x).
common/types/unknown.go:340
↓ 2 callersMethodStartCommand
()
repl/parser/commands_parser.go:490
↓ 2 callersMethodString
String takes a ref.Val and a string representing the current locale identifier and returns the Val formatted as a string, or an error if one occurred.
ext/formatting_v2.go:642
↓ 2 callersFunctionStringsLocale
StringsLocale configures the library with the given locale. The locale tag will be checked for validity at the time that EnvOptions are configured. If
ext/strings.go:347
↓ 2 callersFunctionStringsValidateFormatCalls
StringsValidateFormatCalls validates type-checked ASTs to ensure that string.format() calls have valid formatting clauses and valid argument types for
ext/strings.go:374
↓ 2 callersMethodSubsetFunction
SubsetFunction produces a function declaration which matches the supported subset, or nil if the function is not supported by the LibrarySubset. For
common/env/env.go:581
↓ 2 callersMethodSubsetMacro
SubsetMacro indicates whether the macro function should be included in the library subset.
common/env/env.go:625
↓ 2 callersFunctionTestRunnerOptionsFromFlags
TestRunnerOptionsFromFlags returns a TestRunnerOption which configures the following attributes of the test runner using the parsed flags and the opti
tools/celtest/test_runner.go:184
↓ 2 callersFunctionToFoldableList
ToFoldableList will create a Foldable version of a list suitable for key-value pair iteration. For values which are already Foldable, this call is a
common/types/list.go:573
↓ 2 callersFunctionToFoldableMap
ToFoldableMap will create a Foldable version of a map suitable for key-value pair iteration. For values which are already Foldable, this call is a no
common/types/map.go:996
↓ 2 callersMethodToImmutableList
()
common/types/traits/lister.go:35
↓ 2 callersFunctionTwoVarComprehensionsVersion
TwoVarComprehensionsVersion sets the library version for two-variable comprehensions.
ext/comprehensions.go:175
↓ 2 callersMethodType
Type implements the ref.Val interface method.
ext/native.go:600
↓ 2 callersMethodType
()
common/types/object.go:162
↓ 2 callersMethodType
Type of the expression. If the expression is type-checked, the type check metadata is returned. If the expression has not been type-checked, the type
common/ast/navigable.go:31
↓ 2 callersMethodTypeProvider
TypeProvider returns the `ref.TypeProvider` configured for the environment. Deprecated: use CELTypeProvider()
cel/env.go:726
↓ 2 callersFunctionTypeToExprType
TypeToExprType converts a CEL-native type representation to a protobuf CEL Type representation.
cel/decls.go:363
↓ 2 callersFunctionTypeVariable
TypeVariable creates a new type identifier for use within a types.Provider
common/decls/decls.go:1006
↓ 2 callersMethodUnknownAttributePatterns
UnknownAttributePaths returns a set of AttributePattern values which match Attribute expressions for data accesses whose values are not yet known.
interpreter/activation.go:175
↓ 2 callersFunctionUnparseExprType
UnparseExprType pretty-prints a type (proto representation) for the REPL.
repl/typefmt.go:32
↓ 2 callersFunctionValidatedDeclarations
ValidatedDeclarations provides a references to validated declarations which will be copied into new checker instances.
checker/options.go:38
↓ 2 callersMethodValue
Value returns the constant value of the instruction.
interpreter/interpretable.go:78
↓ 2 callersFunctionVariableDeclToExprDecl
VariableDeclToExprDecl converts a go-native variable declaration into a protobuf-type variable declaration.
common/decls/decls.go:1011
↓ 2 callersFunctionVariableWithDoc
VariableWithDoc creates an instance of a variable declaration with a variable name, type, and doc string.
cel/decls.go:149
↓ 2 callersMethodVariables
Variables returns a shallow copy of the variables associated with the environment.
cel/env.go:633
↓ 2 callersMethodWithJSONFieldNames
WithJSONFieldNames configures the registry with the JSON field name support enabled or disabled.
common/types/provider.go:190
↓ 2 callersFunctionWrapOnOperators
WrapOnOperators specifies which operators to perform word wrapping on an output expression when its string length exceeds the column limit set by Wrap
parser/unparser.go:622
↓ 2 callersFunctionactualSize
actualSize returns the size of the value for all traits.Sizer values, a fixed size for all proto-based objects, and a size of 1 for all other value ty
interpreter/runtimecost.go:336
↓ 2 callersFunctionadaptLiteral
adaptLiteral converts a runtime CEL value to its equivalent literal expression. For strongly typed values, the type-provider will be used to reconstr
cel/folding.go:393
↓ 2 callersMethodadd
(from, to *types.Type)
checker/mapping.go:31
↓ 2 callersMethodaddLetFn
Add or update an existing let then invalidate any computed plans.
repl/evaluator.go:493
↓ 2 callersMethodaddLetVar
Add or update an existing let then invalidate any computed plans.
repl/evaluator.go:441
↓ 2 callersMethodaddOption
(opt Optioner, isYAML bool)
repl/evaluator.go:509
↓ 2 callersMethodaddTerm
addTerm adds an operation identifier and term to the set of terms to be balanced.
parser/helper.go:287
↓ 2 callersFunctionaddTimeDurationChecked
addDurationChecked performs addition with overflow detection of a time.Time and time.Duration. If the operation fails due to overflow the error retur
common/types/overflow.go:196
↓ 2 callersFunctionaddUint64NoOverflow
addUint64NoOverflow adds non-negative ints. If the result is exceeds math.MaxUint64, math.MaxUint64 is returned.
checker/cost.go:224
↓ 2 callersFunctionaliasAs
(kind, qualifiedName, alias string, requireQualified bool)
common/containers/container.go:249
↓ 2 callersMethodapplyContextOptions
(env *cel.Env)
repl/evaluator.go:369
↓ 2 callersFunctionapplyQualifiers
(vars Activation, obj any, qualifiers []Qualifier)
interpreter/attributes.go:1302
↓ 2 callersFunctionassertFuncEquals
(t *testing.T, got, want *decls.FunctionDecl)
common/env/env_test.go:1493
↓ 2 callersFunctionbinaryFormatError
helper routines for reporting common errors during string formatting static validation and runtime execution.
ext/formatting.go:667
↓ 2 callersFunctionbinaryFormatErrorV2
helper routines for reporting common errors during string formatting static validation and runtime execution.
ext/formatting_v2.go:607
↓ 2 callersMethodcalc
(_p int)
parser/gen/cel_parser.go:1613
↓ 2 callersMethodcalc
(_p int)
repl/parser/commands_parser.go:5571
↓ 2 callersMethodcheckAttempts
(recognizer antlr.Parser)
parser/parser.go:299
↓ 2 callersFunctioncheckInvalidArgs
(meh cel.MacroExprFactory, funcName string, args []ast.Expr)
ext/math.go:889
↓ 2 callersFunctioncheckOptionArgs
(idx int, args []string)
repl/evaluator.go:1172
↓ 2 callersMethodcheckSelectField
(e, operand ast.Expr, field string, optional bool)
checker/checker.go:215
↓ 2 callersFunctionclauseForType
(argType ref.Type)
ext/formatting.go:39
↓ 2 callersFunctioncollectEnumValues
collectEnumValues accumulates the enum values within an enum declaration.
common/types/pb/file.go:187
↓ 2 callersFunctioncollectExtensions
(extensions protoreflect.ExtensionDescriptors, msgExtensionMap map[string][]protoreflect.ExtensionDescriptor)
common/types/pb/file.go:199
↓ 2 callersFunctioncollectParamNames
(paramNames map[string]struct{}, arg *types.Type)
common/decls/decls.go:1072
↓ 2 callersFunctioncompareIntDouble
(i Int, d Double)
common/types/compare.go:33
↓ 2 callersFunctioncompareUintDouble
(u Uint, d Double)
common/types/compare.go:47
↓ 2 callersFunctioncompareUintInt
(u Uint, i Int)
common/types/compare.go:65
↓ 2 callersFunctioncompareUnknownIDs
(expectedUnknownIDs, actualUnknownIDs []int64)
tools/celtest/test_runner.go:813
↓ 2 callersMethodcompile
(t testing.TB, envOpts []cel.EnvOption, compilerOpts []CompilerOption)
policy/compiler_test.go:308
↓ 2 callersFunctioncomputeCost
(t *testing.T, expr string, vars []*decls.VariableDecl, ctx Activation, options []CostTrackerOption)
interpreter/runtimecost_test.go:112
↓ 2 callersMethodcomputeUnknownVars
computeUnknownVars determines a set of missing variables based on the input activation and the environment's configured declaration set.
cel/env.go:945
↓ 2 callersMethodcondition
condition returns the condition associated with the output.
policy/composer.go:415
↓ 2 callersMethodconfigure
configure applies a series of EnvOptions to the current environment.
cel/env.go:817
↓ 2 callersMethodconfiguredExpressionSizeLimit
configuredExpressionSizeLimit returns the effective expression size code point limit. A zero value means "use the parser default".
cel/env.go:441
↓ 2 callersFunctionconstructActivation
(t *testing.T, in any)
interpreter/runtimecost_test.go:177
↓ 2 callersFunctionconvertProto
(src, dst proto.Message)
common/types/types.go:816
↓ 2 callersMethodcopySizeEstimates
(dst, src ast.Expr)
checker/cost.go:938
↓ 2 callersMethodcreate
(parent, child Activation)
interpreter/frame.go:219
↓ 2 callersFunctioncustomPolicyParserOption
()
tools/celtest/test_runner_test.go:124
↓ 2 callersFunctiondecObserveEval
decObserveEval records evaluation state into an EvalState object.
interpreter/decorators.go:33
↓ 2 callersFunctiondecimalFormatError
(id int64, badType string)
ext/formatting.go:671
↓ 2 callersFunctiondecimalFormatErrorV2
(id int64, badType string)
ext/formatting_v2.go:611
↓ 2 callersMethoddecorate
decorate applies the InterpretableDecorator functions to the given Interpretable. Both the Interpretable and error generated by a Plan step are accept
interpreter/planner.go:112
↓ 2 callersFunctiondoubleToInt64Checked
doubleToInt64Checked converts a double to an int64 value. If the conversion fails due to overflow the error return value will be non-nil.
common/types/overflow.go:302
↓ 2 callersFunctiondoubleToUint64Checked
doubleToInt64Checked converts a double to a uint64 value. If the conversion fails due to overflow the error return value will be non-nil.
common/types/overflow.go:312
↓ 2 callersFunctionenvOptionToConfig
(t *testing.T, name string, opts ...cel.EnvOption)
tools/compiler/compiler_test.go:359
↓ 2 callersFunctionenvProtoToConfig
(pbEnv *configpb.Environment)
tools/compiler/compiler.go:270
↓ 2 callersFunctionequalMessage
(mx, my protoreflect.Message)
common/types/pb/equal.go:54
↓ 2 callersFunctionestimateListSortCost
estimateListSortCost estimates an O(n^2) sort operation with a cost factor of 2 for the equality operations which occur during the sort computation.
ext/lists.go:708
↓ 2 callersFunctionestimateTraversal
estimateTraversal computes cost as a function of the size of the target object and whether the call allocates memory.
ext/costs.go:44
↓ 2 callersMethodeval
(t testing.TB, expr string)
policy/compiler_test.go:467
← previousnext →1,101–1,200 of 7,240, ranked by callers