MCPcopy Create free account

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

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

↓ 11 callersMethodNewQualifier
NewQualifier creates a qualifier on the target object with a given value. The 'val' may be an Attribute or any proto-supported map key type: bool, in
interpreter/attributes.go:62
↓ 11 callersFunctionNewTypeParam
NewTypeParam describe a type-param type.
common/env/env.go:783
↓ 11 callersMethodNewValue
NewValue creates a new type value from a qualified name and map of field name to value. Note, for each value, the Val.ConvertToNative function will b
common/types/provider.go:73
↓ 11 callersFunctionOverloadCostEstimate
OverloadCostEstimate binds a FunctionCoster to a specific function overload ID. When a OverloadCostEstimate is provided, it will override the cost ca
checker/cost.go:277
↓ 11 callersFunctionOverloadCostTracker
OverloadCostTracker binds an overload ID to a runtime FunctionTracker implementation. OverloadCostTracker instances augment or override ActualCostEst
interpreter/runtimecost.go:218
↓ 11 callersMethodPop
Pop returns the parent frame, releasing the current frame back to the pool.
interpreter/frame.go:166
↓ 11 callersMethodSetConfig
SetConfig sets the set of map key-value pairs associated with this validator's configuration.
common/env/env.go:718
↓ 11 callersMethodSetContext
SetContext sets the context for the execution frame.
interpreter/frame.go:98
↓ 11 callersFunctionTypeToExprType
TypeToExprType converts a CEL-native type representation to a protobuf CEL Type representation.
common/types/types.go:602
↓ 11 callersFunctionUnaryBinding
UnaryBinding provides the implementation of a unary overload. The provided function is protected by a runtime type-guard which ensures runtime type ag
common/decls/decls.go:913
↓ 11 callersFunctionduration
(seconds, nanos int64)
common/types/duration_test.go:267
↓ 11 callersMethodnewExpr
(id int64, e exprKindCase)
common/ast/factory.go:316
↓ 11 callersFunctionnewStandardInterpreter
newStandardInterpreter builds a Dispatcher and TypeProvider with support for all of the CEL builtins defined in the language definition.
interpreter/interpreter_test.go:2664
↓ 11 callersFunctiontestIDGen
(seed int64)
common/ast/expr_test.go:506
↓ 10 callersFunctionAbbrevs
Abbrevs configures a set of simple names as abbreviations for fully-qualified names. An abbreviation (abbrev for short) is a simple name that expands
cel/options.go:320
↓ 10 callersMethodContent
Content returns the source content represented as a string. Examples contents are the single file contents, textbox field, or url parameter.
common/source.go:28
↓ 10 callersMethodContextEval
ContextEval evaluates the program with a set of input variables and a context object in order to support cancellation and timeouts. This method must b
cel/program.go:57
↓ 10 callersFunctionCostEstimatorOptions
CostEstimatorOptions configure type-check time options for estimating expression cost.
cel/options.go:795
↓ 10 callersFunctionCostTrackerOptions
CostTrackerOptions configures a set of options for cost-tracking. Note, CostTrackerOptions is a no-op unless CostTracking is also enabled.
cel/options.go:805
↓ 10 callersMethodFoldEntry
FoldEntry indicates the key, value pair associated with the entry. If the output is true, continue folding. Otherwise, terminate the fold.
common/types/traits/iterator.go:48
↓ 10 callersFunctionFormatCELType
FormatCELType formats a types.Type value to a string representation. The type formatting is identical to FormatCheckedType.
checker/format.go:109
↓ 10 callersFunctionFunctionBinding
FunctionBinding provides the implementation of a variadic overload. The provided function is protected by a runtime type-guard which ensures runtime t
common/decls/decls.go:949
↓ 10 callersMethodGetOffsetRange
GetOffsetRange retrieves an OffsetRange for the given expression id if one exists.
common/ast/ast.go:360
↓ 10 callersMethodGetOp
GetOp returns the op token.
repl/parser/commands_parser.go:4377
↓ 10 callersMethodIsEquivalentType
IsEquivalentType indicates whether two types are equivalent. This check ignores type parameter type names.
common/types/types.go:279
↓ 10 callersFunctionKindMatcher
KindMatcher returns an ExprMatcher which will return true if the input NavigableExpr.Kind() matches the specified `kind`.
common/ast/navigable.go:78
↓ 10 callersMethodLine
()
common/location.go:19
↓ 10 callersMethodNewAccuIdent
NewAccuIdent returns an accumulator identifier for use with comprehension results.
parser/macro.go:273
↓ 10 callersMethodNewComprehensionTwoVar
NewComprehensionTwoVar creates a new two-variable comprehension instruction. - iterRange represents the expression that resolves to a list or map whe
parser/macro.go:260
↓ 10 callersFunctionNewEmptyRegistry
NewEmptyRegistry returns a registry which is completely unconfigured.
common/types/provider.go:187
↓ 10 callersFunctionNewNativeType
NewNativeType constructs a NativeType instance for a Go struct reflect.Type.
common/types/native.go:46
↓ 10 callersMethodNewStructField
NewStructField creates a StructField with a given field name, value, and a flag indicating whether the field is optionally set.
common/ast/factory.go:76
↓ 10 callersFunctionNewVariable
NewVariable returns a serializable variable from a name and type definition
common/env/env.go:244
↓ 10 callersFunctionOptimize
Optimize will pre-compute operations such as list and map construction and optimize call arguments to set membership tests. The set of optimizations w
interpreter/interpreter.go:201
↓ 10 callersMethodPartialVars
PartialVars returns a PartialActivation where all variables not in the input variable set, but which have been configured in the environment, are mark
cel/env.go:830
↓ 10 callersFunctionPopulateMacroCalls
PopulateMacroCalls ensures that the original call signatures replaced by expanded macros are preserved in the `SourceInfo` of parse result.
parser/options.go:130
↓ 10 callersMethodPush
Push pushes the given activation onto the activation stack and returns the new frame. This operation is internal to the interpreter and is used to ha
interpreter/frame.go:157
↓ 10 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:496
↓ 10 callersMethodSetCompletions
SetCompletions configures a channel to receive callIDs when asynchronous evaluations finish.
interpreter/frame.go:287
↓ 10 callersMethodassertYAMLType
(id int64, node *yaml.Node, nodeTypes ...yamlNodeType)
policy/parser.go:890
↓ 10 callersMethodcheck
(e ast.Expr)
checker/checker.go:82
↓ 10 callersFunctioninTimeZone
(ts, tz ref.Val)
common/stdlib/standard.go:1044
↓ 10 callersFunctioninterpret
(t testing.TB, env *Env, expr string, vars any)
cel/cel_test.go:4410
↓ 10 callersMethodsetType
(e ast.Expr, t *types.Type)
checker/checker.go:672
↓ 10 callersFunctiontimeZone
(tz ref.Val, visitor timestampVisitor)
common/types/timestamp.go:355
↓ 9 callersMethodAdd
Add adds the costs and returns the sum. If add would result in an uint64 overflow for the min or max, the value is set to math.MaxUint64.
checker/cost.go:185
↓ 9 callersMethodAddLetFn
AddLetFn adds a let function to the evaluation context.
repl/evaluator.go:626
↓ 9 callersMethodAddVariables
AddVariables adds one or more variables to the config.
common/env/env.go:132
↓ 9 callersFunctionAttributePattern
AttributePattern returns an AttributePattern that matches a top-level variable. The pattern is mutable, and its methods support the specification of o
cel/program.go:130
↓ 9 callersMethodCollectMetadata
CollectMetadata records the source position information of a given YAML node, and returns the id associated with the source metadata which is returned
policy/parser.go:392
↓ 9 callersMethodDispatchPendingAsyncCalls
DispatchPendingAsyncCalls launches pending asynchronous calls for the specified required call IDs.
interpreter/frame.go:253
↓ 9 callersFunctionEnvironmentFile
EnvironmentFile returns an EnvOption which loads a serialized CEL environment from a file. The file must be in one of the following formats: - Textpro
tools/compiler/compiler.go:224
↓ 9 callersMethodEstimateCost
EstimateCost estimates the cost of a type checked CEL expression using the length estimates of input data and extension functions provided by estimato
cel/env.go:884
↓ 9 callersMethodFindStructFieldNames
FindStructFieldNames returns the field names associated with the type, if the type is found.
common/types/provider.go:61
↓ 9 callersMethodHasBinding
HasBinding indicates whether the overload already has a definition.
common/decls/decls.go:796
↓ 9 callersMethodIs
Is implements errors.Is.
common/types/err.go:160
↓ 9 callersMethodMacroCalls
MacroCalls returns a map of expression id to ast.Expr value where the id represents the expression node where the macro was inserted into the AST, and
common/ast/ast.go:318
↓ 9 callersFunctionMergeUnknowns
MergeUnknowns combines two unknown values into a new unknown value.
common/types/unknown.go:291
↓ 9 callersMethodNewAST
NewAST creates an AST from the current expression using the tracked source info which is modified and managed by the OptimizerContext.
cel/optimizer.go:273
↓ 9 callersFunctionNewContextVariable
NewContextVariable returns a serializable context variable with a specific type name.
common/env/env.go:317
↓ 9 callersFunctionNewExprVisitor
NewExprVisitor creates a visitor which only visits expression nodes.
common/ast/navigable.go:167
↓ 9 callersFunctionNewFunction
NewFunction creates a serializable function and overload set.
common/env/env.go:341
↓ 9 callersFunctionNewImport
NewImport returns a serializable import value from the qualified type name.
common/env/env.go:222
↓ 9 callersMethodNewList
NewList creates a CreateList instruction where the list is comprised of the optional set of elements provided as arguments.
cel/macro.go:81
↓ 9 callersFunctionNewParser
NewParser creates a new Parser object with a set of functional options.
policy/parser.go:514
↓ 9 callersMethodNewString
NewString creates a new ValueString from the YAML node.
policy/parser.go:407
↓ 9 callersFunctionParseStructTags
ParseStructTags configures if native types field names should be overridable by CEL struct tags. This is equivalent to ParseStructTag("cel").
common/types/native.go:70
↓ 9 callersMethodQualString
QualString adds a string qualifier pattern to the AttributePattern. The string may be a valid identifier, or string map key including empty string.
interpreter/attribute_patterns.go:63
↓ 9 callersMethodReceive
Receive accepts a function name, overload id, and arguments and returns a value.
common/types/traits/receiver.go:23
↓ 9 callersMethodRegisterDescriptor
RegisterDescriptor registers the contents of a protocol buffer `FileDescriptor`.
common/types/ref/provider.go:70
↓ 9 callersFunctionSingletonUnaryBinding
SingletonUnaryBinding creates a singleton function definition to be used for all function overloads. Note, this approach works well if operand is exp
common/decls/decls.go:497
↓ 9 callersMethodSourceInfo
SourceInfo returns the policy file metadata about expression positions.
policy/parser.go:65
↓ 9 callersFunctionTypeDescs
TypeDescs adds type declarations from any protoreflect.FileDescriptor, protoregistry.Files, google.protobuf.FileDescriptorProto or google.protobuf.Fil
cel/options.go:385
↓ 9 callersMethodTypeName
TypeName returns the type-erased fully qualified runtime type name. TypeName implements the ref.Type interface method.
common/types/types.go:372
↓ 9 callersMethodappend
(s string)
common/debug/debug.go:276
↓ 9 callersMethodcopy
()
repl/evaluator.go:400
↓ 9 callersMethodcost
(e ast.Expr)
checker/cost.go:464
↓ 9 callersFunctionfeatures
features sets the given feature flags. See list of Feature constants above.
cel/options.go:978
↓ 9 callersFunctionisTypeTag
(node *yaml.Node, wantTag yamlNodeType)
policy/yaml.go:96
↓ 9 callersFunctionnewTestFrame
newTestFrame creates an ExecutionFrame with an evaluation context attached.
interpreter/async_test.go:53
↓ 9 callersFunctionnilTestExpr
(t testing.TB)
common/ast/expr_test.go:495
↓ 9 callersFunctiontestCheckCost
(t *testing.T, env *cel.Env, ast *cel.Ast, hints map[string]uint64, wantEst checker.CostEstimate)
ext/sets_test.go:488
↓ 9 callersFunctionupdateContextPlans
Attempt to update context in place after an update. This is done eagerly to help avoid introducing an invalid 'let' expression. The planned expression
repl/evaluator.go:550
↓ 8 callersMethodAddValidators
AddValidators appends one or more validators to the config.
common/env/env.go:204
↓ 8 callersFunctionBinaryBinding
BinaryBinding provides the implementation of a binary overload. The provided function is protected by a runtime type-guard which ensures runtime type
common/decls/decls.go:931
↓ 8 callersMethodColumn
1-based line number within source.
common/location.go:20
↓ 8 callersMethodComputeResult
ComputeResult tracks and computes the result of the given asynchronous function. The first invocation for a given (node id, args) tuple registers the
interpreter/frame.go:240
↓ 8 callersMethodCreateEnv
CreateEnv creates a singleton CEL environment with the configured environment options.
tools/compiler/compiler.go:95
↓ 8 callersFunctionCrossTypeNumericComparisons
CrossTypeNumericComparisons toggles type-checker support for numeric comparisons across type See https://github.com/google/cel-spec/wiki/proposal-210
checker/options.go:29
↓ 8 callersFunctionEagerlyValidateDeclarations
EagerlyValidateDeclarations ensures that any collisions between configured declarations are caught at the time of the `NewEnv` call. Eagerly validati
cel/options.go:228
↓ 8 callersMethodEnumValue
EnumValue returns the numeric value of the given enum value name.
common/types/provider.go:45
↓ 8 callersFunctionFixedSizeEstimate
FixedSizeEstimate returns a size estimate with a fixed min and max range.
checker/cost.go:110
↓ 8 callersFunctionFromConfig
FromConfig produces and applies a set of EnvOption values derived from an env.Config object. For configuration elements which refer to features outsi
cel/options.go:548
↓ 8 callersFunctionFunctionDocs
FunctionDocs configures documentation from a list of strings separated by newlines.
common/decls/decls.go:463
↓ 8 callersFunctionInferFileFormat
InferFileFormat infers the file format from the file path.
tools/compiler/compiler.go:201
↓ 8 callersFunctionInitEmptyLiteralContext
(p *LiteralContext)
parser/gen/cel_parser.go:5499
↓ 8 callersFunctionInitEmptyLiteralContext
(p *LiteralContext)
repl/parser/commands_parser.go:9457
↓ 8 callersFunctionJSONFieldNames
JSONFieldNames configures the Db to support proto field accesses by their JSON names.
common/types/pb/pb.go:91
↓ 8 callersMethodJSONFieldNames
JSONFieldNames returns whether json field names are enabled in this registry.
common/types/provider.go:251
↓ 8 callersMethodKind
()
common/ast/expr.go:329
← previousnext →301–400 of 7,701, ranked by callers