MCPcopy Create free account

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

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

↓ 39 callersMethodSize
Size returns the number of entries in the map.
common/ast/expr.go:218
↓ 39 callersMethodToDisplayString
ToDisplayString decorates the error message with the source location.
common/error.go:46
↓ 38 callersFunctionMemberOverload
MemberOverload creates a member function OverloadModel with functional options.
common/cost/model.go:1175
↓ 38 callersFunctionSum
Sum creates an expression representing the sum of the given terms.
common/cost/model.go:660
↓ 38 callersMethodType
Type returns the TypeValue of the value.
common/types/ref/reference.go:58
↓ 37 callersMethodGetValue
GetValue returns the wrapped value contained in the optional.
common/types/optional.go:50
↓ 37 callersMethodIsMemberFunction
IsMemberFunction returns whether the call has a non-nil target indicating it is a member function
common/ast/expr.go:167
↓ 37 callersMethodIterator
Iterator returns an Iterator over the map key set.
common/types/map.go:121
↓ 37 callersMethodLA
LA implements (antlr.CharStream).LA.
parser/input.go:38
↓ 37 callersFunctionOptionalOf
OptionalOf returns an optional value which wraps a concrete CEL value.
common/types/optional.go:35
↓ 37 callersMethodParameters
Parameters returns the list of type parameters if set. For ListKind, Parameters()[0] represents the list element type For MapKind, Parameters()[0] re
common/types/types.go:343
↓ 37 callersFunctionTarget
Target creates an expression referencing the size of the receiver / target object.
common/cost/model.go:298
↓ 36 callersFunctionMacros
Macros adds the given macros to the parser.
parser/options.go:116
↓ 35 callersFunctionBeforeVersion
BeforeVersion records the options that priced the overload before the given model revision. At revisions earlier than version, the overload is config
common/cost/model.go:1145
↓ 35 callersMethodConvertToType
ConvertToType supports type conversions between CEL value types supported by the expression language.
common/types/ref/reference.go:52
↓ 35 callersFunctionIsUnknown
IsUnknown returns whether the element ref.Val is in instance of *types.Unknown
common/types/unknown.go:264
↓ 35 callersMethodKey
Key returns the map entry key expression.
common/ast/expr.go:227
↓ 35 callersFunctionRangedCostEstimate
RangedCostEstimate returns a cost estimate bounded by min and max.
common/cost/cost.go:343
↓ 34 callersMethodAbsoluteAttribute
AbsoluteAttribute creates an attribute that refers to a top-level variable name. Checked expressions generate absolute attribute with a single name.
interpreter/attributes.go:39
↓ 34 callersMethodAsMap
AsMap adapts the expr into a MapExpr. The Kind() must be equal to a MapKind for the conversion to be well-defined.
common/ast/expr.go:92
↓ 34 callersFunctionCompile
Compile is a convenience function that constructs a new Env using the provided EnvOption values, compiles the expression string, and plans an executab
cel/cel.go:26
↓ 34 callersMethodEnterRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1088
↓ 34 callersMethodExitRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1094
↓ 34 callersMethodFields
Fields returns the set of field initializers in the struct expression as EntryExpr values.
common/ast/expr.go:245
↓ 34 callersFunctionNativeTypes
NativeTypes creates a type provider which uses reflect.Type and reflect.Value instances to produce type definitions that can be used within CEL. All
ext/native.go:122
↓ 34 callersMethodOperand
Operand returns the selection operand expression.
common/ast/expr.go:200
↓ 34 callersFunctionOverload
Overload creates a global function OverloadModel with functional options.
common/cost/model.go:1170
↓ 34 callersMethodResolve
Resolve returns the value of the Attribute and whether it was present given an Activation. For objects which support safe traversal, the value may be
interpreter/attributes.go:113
↓ 33 callersFunctionAstToString
AstToString converts an Ast back to a string if possible. Note, the conversion may not be an exact replica of the original expression, but will produ
cel/io.go:142
↓ 33 callersMethodError
Error implements the error interface method.
interpreter/attributes.go:1669
↓ 33 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:955
↓ 33 callersMethodHasNext
HasNext returns true if there are unvisited elements in the Iterator.
common/types/traits/iterator.go:32
↓ 33 callersFunctionLength
Length creates an expression referencing the shallow top-level length of a single value (its CEL size() / ActualSize), independent of the sizing strat
common/cost/model.go:452
↓ 33 callersFunctionResultSize
ResultSize sets the result size expression for the overload model. Passing nil in a BeforeVersion entry clears any result size inherited from the encl
common/cost/model.go:1107
↓ 32 callersFunctionBindings
Bindings returns a cel.EnvOption to configure support for local variable bindings in expressions. # Cel.Bind Binds a simple identifier to an initial
ext/bindings.go:54
↓ 32 callersFunctionContainer
Container sets the container for resolving variable names. Defaults to an empty container. If all references within an expression are relative to a p
cel/options.go:280
↓ 31 callersMethodAddQualifier
AddQualifier adds a qualifier on the Attribute or error if the qualification is not a valid qualifier type.
interpreter/attributes.go:105
↓ 31 callersMethodCELTypeAdapter
CELTypeAdapter returns the `types.Adapter` configured for the environment.
cel/env.go:847
↓ 31 callersMethodParse
Parse parses the input expression value `txt` to a Ast and/or a set of Issues. This form of Parse creates a Source value for the input `txt` and forw
cel/env.go:764
↓ 30 callersMethodHasValue
HasValue returns true if the optional has a value.
common/types/optional.go:45
↓ 30 callersFunctionNewConstValue
NewConstValue creates a new constant valued Interpretable.
interpreter/interpretable.go:314
↓ 30 callersFunctionNewUnknown
NewUnknown creates a new unknown at a given expression id for an attribute. If the attribute is nil, the attribute value will be the `unspecifiedAttr
common/types/unknown.go:156
↓ 30 callersMethodParse
Parse generates an internal parsed policy representation from a YAML input file. The internal representation ensures that CEL expressions are tracked
policy/parser.go:572
↓ 29 callersFunctionEvalActivation
EvalActivation runs an InterpretableV2 Exec method safely with any Activation, wrapping it in a pooled ExecutionFrame if needed and releasing it after
interpreter/interpretable.go:209
↓ 29 callersFunctionMemberOverload
MemberOverload defines a new receiver-style overload (or member function) with an overload id, argument types, and result type. Through the use of Ove
cel/decls.go:317
↓ 29 callersMethodNewCall
NewCall creates a function call Expr value for a global (free) function.
parser/macro.go:279
↓ 29 callersFunctionScale
Scale creates an expression that scales another expression by a constant factor, rounding up. Factors are constant so that a model's runtime charge d
common/cost/model.go:760
↓ 28 callersMethodAggregateSize
AggregateSize returns the size of the input value, if known. Otherwise, a unit size of 1 is returned.
common/types/aggregate_sizer.go:21
↓ 28 callersFunctionEnableMacroCallTracking
EnableMacroCallTracking ensures that call expressions which are replaced by macros are tracked in the `SourceInfo` of parsed and checked expressions.
cel/options.go:1109
↓ 28 callersFunctionEncoders
Encoders returns a cel.EnvOption to configure extended functions for string, byte, and object encodings. Note: all functions use the 'base64', 'json'
ext/encoders.go:156
↓ 28 callersFunctionNavigateAST
NavigateAST converts an AST to a NavigableExpr
common/ast/navigable.go:46
↓ 28 callersFunctionNewDynamicMap
NewDynamicMap returns a traits.Mapper value with dynamic key, value pairs.
common/types/map.go:40
↓ 28 callersFunctionNewSizeCalculator
NewSizeCalculator returns a new SizeCalculator configured with optional SizeCalculatorOption settings.
common/types/size_calc.go:89
↓ 28 callersFunctionSafeAdd
SafeAdd returns the sum of the input values, saturating at math.MaxUint64.
common/cost/cost.go:78
↓ 27 callersMethodAccuInit
AccuInit returns the accumulation variable initialization expression.
common/ast/expr.go:292
↓ 27 callersMethodEntries
Entries returns the map key value pairs as EntryExpr values.
common/ast/expr.go:215
↓ 27 callersMethodIsOptional
IsOptional indicates whether the given element index is optional.
common/ast/expr.go:188
↓ 27 callersMethodIterRange
IterRange returns the iteration range expression.
common/ast/expr.go:269
↓ 27 callersMethodMultiplyByCostFactor
MultiplyByCostFactor multiplies a SizeEstimate by a cost factor and returns the CostEstimate with the nearest integer of the result, rounded up.
common/cost/cost.go:264
↓ 27 callersFunctionNewRefValList
NewRefValList returns a traits.Lister with ref.Val elements. This type specialization is used with list literals within CEL expressions.
common/types/list.go:132
↓ 27 callersMethodTarget
Target returns the target of the expression if one is present.
common/ast/expr.go:170
↓ 27 callersFunctionUnaryBinding
UnaryBinding provides the implementation of a unary overload. The provided function is protected by a runtime type-guard which ensures runtime type ag
cel/decls.go:331
↓ 26 callersMethodAsMapEntry
AsMapEntry casts the EntryExpr to a MapEntry. The Kind() must be equal to MapEntryKind for the conversion to be well-defined.
common/ast/expr.go:145
↓ 26 callersFunctionCheck
Check performs type checking, giving a typed AST. The input is a parsed AST and an env which encapsulates type binding of variables, declarations of
checker/checker.go:51
↓ 26 callersMethodClone
Clone makes a shallow copy of the tracker with no accumulated cost. The different clones can be used independently from each other: they share only co
common/cost/tracker.go:166
↓ 26 callersMethodIDs
IDs returns the list of ids with recorded values.
interpreter/evalstate.go:24
↓ 26 callersMethodNewLiteral
Literal creates an Expr value for a scalar literal value.
parser/macro.go:202
↓ 25 callersMethodAccuVar
AccuVar returns the accumulation variable name.
common/ast/expr.go:289
↓ 25 callersMethodAsStruct
AsStruct adapts the expr into a StructExpr. The Kind() must be equal to a StructKind for the conversion to be well-defined.
common/ast/expr.go:102
↓ 25 callersFunctionBinaryBinding
BinaryBinding provides the implementation of a binary overload. The provided function is protected by a runtime type-guard which ensures runtime type
cel/decls.go:337
↓ 25 callersMethodEstimateSize
EstimateSize returns the SizeEstimate of an AstNode. If nil is returned, the size of the node is calculated by the SizingStrategy.
common/cost/estimator.go:40
↓ 25 callersMethodFieldName
FieldName returns the field name being selected from the operand.
common/ast/expr.go:203
↓ 25 callersMethodIsTestOnly
IsTestOnly indicates whether the select expression is a presence test generated by a macro.
common/ast/expr.go:206
↓ 25 callersMethodLoopStep
LoopStep returns the loop step expression.
common/ast/expr.go:298
↓ 25 callersFunctionNewAstNode
NewAstNode returns an AstNode with the given expression, path, type, and derived size.
common/cost/estimator.go:92
↓ 25 callersFunctionNewStringList
NewStringList returns a traits.Lister containing only strings.
common/types/list.go:125
↓ 24 callersFunctionASTValidators
ASTValidators configures a set of ASTValidator instances into the target environment. Validators are applied in the order in which they are specified
cel/validator.go:103
↓ 24 callersMethodCopyAll
(ctx *UnaryContext)
parser/gen/cel_parser.go:1790
↓ 24 callersMethodCopyAll
(ctx *UnaryContext)
repl/parser/commands_parser.go:5748
↓ 24 callersMethodLoopCondition
LoopCondition returns the loop condition expression.
common/ast/expr.go:295
↓ 24 callersFunctionNewCallEstimate
NewCallEstimate creates a new CallEstimate with the given cost and optional result size.
common/cost/cost.go:395
↓ 24 callersFunctionNewEnv
NewEnv returns a new *Env with the given parameters.
checker/env.go:86
↓ 24 callersFunctionNewEvaluator
NewEvaluator returns an inialized evaluator
repl/evaluator.go:537
↓ 24 callersFunctionNewTypeTypeWithParam
NewTypeTypeWithParam creates a type with a type parameter. Used for type-checking purposes, but equivalent to TypeType otherwise.
common/types/types.go:619
↓ 24 callersMethodPath
Path returns a field path through the provided type declarations to the type of the AstNode, or nil if the AstNode does not represent type directly re
common/cost/estimator.go:48
↓ 23 callersMethodCopy
Copy the input expression with a brand new set of identifiers.
cel/macro.go:59
↓ 23 callersMethodFind
Find returns a value, if one exists, for the input key. If the key is not found the function returns (nil, false).
common/types/map.go:118
↓ 23 callersFunctionNewDb
NewDb creates a new `pb.Db` with an empty type name to file description map.
common/types/pb/pb.go:99
↓ 23 callersMethodNewInterpretable
NewInterpretable creates an InterpretableV2 from a checked expression and an optional list of PlannerOption values.
interpreter/interpreter.go:36
↓ 23 callersFunctionParseStructTag
ParseStructTag configures the struct tag to parse. The 0th item in the tag is used as the name of the CEL field. A tag starting with "-" (e.g. `cel:"
common/types/native.go:144
↓ 23 callersMethodRenumberIDs
RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids.
common/ast/expr.go:105
↓ 22 callersFunctionAggregateSizingStrategy
AggregateSizingStrategy returns a SizingStrategy that computes recursive size estimates by following paths during cost estimation, and calculates actu
common/cost/aggregate_strategy.go:42
↓ 22 callersMethodGetText
GetText implements (antlr.CharStream).GetText.
parser/input.go:94
↓ 22 callersFunctionMatchDescendants
MatchDescendants takes a NavigableExpr and ExprMatcher and produces a list of NavigableExpr values matching the input criteria in post-order (bottom u
common/ast/navigable.go:106
↓ 22 callersFunctionMemberOverload
MemberOverload defines a new receiver-style overload (or member function) with an overload id, argument types, and result type. Through the use of Ove
common/decls/decls.go:622
↓ 22 callersFunctionNewAttributeTrail
NewAttributeTrail creates a new simple attribute from a variable name.
common/types/unknown.go:34
↓ 22 callersFunctionNewExecutionFrame
NewExecutionFrame creates a new execution frame from the pool.
interpreter/frame.go:135
↓ 22 callersMethodNewList
NewList creates an Expr value representing a list literal expression with optional indices. Optional indices will typically be empty unless the CEL o
common/ast/factory.go:55
↓ 22 callersFunctionNewNativeType
NewNativeType constructs a NativeType instance for a Go struct reflect.Type.
common/types/native.go:48
↓ 22 callersFunctionNewStaticOptimizer
NewStaticOptimizer creates a StaticOptimizer with a sequence of ASTOptimizer's to be applied to a checked expression.
cel/optimizer.go:46
← previousnext →101–200 of 9,178, ranked by callers