MCPcopy Create free account

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

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

↓ 29 callersMethodKey
Key returns the map entry key expression.
common/ast/expr.go:227
↓ 29 callersFunctionestimateSize
(estimator checker.CostEstimator, node checker.AstNode)
ext/costs.go:52
↓ 28 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
↓ 28 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:125
↓ 28 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:268
↓ 28 callersFunctionNewConstValue
NewConstValue creates a new constant valued Interpretable.
interpreter/interpretable.go:299
↓ 28 callersFunctionNewVariable
NewVariable creates a new variable declaration.
common/decls/decls.go:1033
↓ 28 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
↓ 28 callersMethodSize
Size returns the number of elements or length of the value.
common/types/traits/sizer.go:24
↓ 27 callersMethodMultiplyByCostFactor
MultiplyByCostFactor multiplies a SizeEstimate by a cost factor and returns the CostEstimate with the nearest integer of the result, rounded up.
checker/cost.go:134
↓ 27 callersFunctionNavigateAST
NavigateAST converts an AST to a NavigableExpr
common/ast/navigable.go:46
↓ 27 callersFunctionNewAST
NewAST creates a base AST instance with an ast.Expr and ast.SourceInfo value.
common/ast/ast.go:108
↓ 27 callersMethodTarget
Target returns the target of the expression if one is present.
common/ast/expr.go:170
↓ 27 callersMethodToDisplayString
ToDisplayString decorates the error message with the source location.
common/error.go:46
↓ 26 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
↓ 26 callersMethodError
Error implements the error interface method.
interpreter/attributes.go:1463
↓ 26 callersMethodHasNext
HasNext returns true if there are unvisited elements in the Iterator.
common/types/traits/iterator.go:32
↓ 26 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:106
↓ 26 callersMethodNewCall
NewCall creates a function call Expr value for a global (free) function.
parser/macro.go:279
↓ 26 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
↓ 26 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:699
↓ 25 callersMethodAddQualifier
AddQualifier adds a qualifier on the Attribute or error if the qualification is not a valid qualifier type.
interpreter/attributes.go:105
↓ 25 callersFunctionEnableMacroCallTracking
EnableMacroCallTracking ensures that call expressions which are replaced by macros are tracked in the `SourceInfo` of parsed and checked expressions.
cel/options.go:956
↓ 25 callersFunctionStrings
Strings returns a cel.EnvOption to configure extended functions for string manipulation. As a general note, all indices are zero-based. # CharAt Int
ext/strings.go:318
↓ 24 callersMethodCopyAll
(ctx *UnaryContext)
parser/gen/cel_parser.go:1790
↓ 24 callersMethodCopyAll
(ctx *UnaryContext)
repl/parser/commands_parser.go:5748
↓ 24 callersMethodHasValue
HasValue returns true if the optional has a value.
common/types/optional.go:45
↓ 24 callersMethodIDs
IDs returns the list of ids with recorded values.
interpreter/evalstate.go:24
↓ 24 callersFunctionMacros
Macros adds the given macros to the parser.
parser/options.go:114
↓ 24 callersFunctionNewEvaluator
NewEvaluator returns an inialized evaluator
repl/evaluator.go:537
↓ 24 callersFunctionNewParser
NewParser builds and returns a new Parser using the provided options.
parser/parser.go:42
↓ 23 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:93
↓ 23 callersMethodEntries
Entries returns the map key value pairs as EntryExpr values.
common/ast/expr.go:215
↓ 23 callersMethodFieldName
FieldName returns the field name being selected from the operand.
common/ast/expr.go:203
↓ 23 callersMethodIsOptional
IsOptional indicates whether the given element index is optional.
common/ast/expr.go:188
↓ 23 callersMethodIterRange
IterRange returns the iteration range expression.
common/ast/expr.go:269
↓ 23 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:601
↓ 23 callersFunctionNewDb
NewDb creates a new `pb.Db` with an empty type name to file description map.
common/types/pb/pb.go:99
↓ 23 callersFunctionNewDynamicMap
NewDynamicMap returns a traits.Mapper value with dynamic key, value pairs.
common/types/map.go:36
↓ 23 callersMethodValue
Value returns the observed value of the given expression id if found, and a nil false result if not.
interpreter/evalstate.go:28
↓ 23 callersFunctionactualSize
(value ref.Val)
ext/costs.go:62
↓ 22 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
↓ 22 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
↓ 22 callersFunctionFixedCostEstimate
FixedCostEstimate returns a cost with a fixed min and max range.
checker/cost.go:179
↓ 22 callersMethodGetText
GetText implements (antlr.CharStream).GetText.
parser/input.go:94
↓ 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
cel/decls.go:317
↓ 22 callersMethodRenumberIDs
RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids.
common/ast/expr.go:105
↓ 22 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
↓ 22 callersFunctioncallEstimate
(cost checker.CostEstimate, sz *checker.SizeEstimate)
ext/costs.go:84
↓ 21 callersMethodAccuInit
AccuInit returns the accumulation variable initialization expression.
common/ast/expr.go:292
↓ 21 callersMethodDescribeType
DescribeType returns a `TypeDescription` for the `typeName` if it exists in the `pb.Db`.
common/types/pb/pb.go:235
↓ 21 callersMethodLoopCondition
LoopCondition returns the loop condition expression.
common/ast/expr.go:295
↓ 21 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
↓ 21 callersMethodNewLiteral
Literal creates an Expr value for a scalar literal value.
parser/macro.go:202
↓ 21 callersFunctionNewOpaqueType
NewOpaqueType creates an abstract parameterized type with a given name.
common/types/types.go:530
↓ 20 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
↓ 20 callersMethodCopy
Copy the input expression with a brand new set of identifiers.
cel/macro.go:59
↓ 20 callersMethodIsTestOnly
IsTestOnly indicates whether the select expression is a presence test generated by a macro.
common/ast/expr.go:206
↓ 20 callersFunctionLabelErrNode
LabelErrNode returns val unaltered it is not an Err or if the error has a non-zero AST node ID already present. Otherwise the id is added to the error
common/types/err.go:80
↓ 20 callersMethodLoopStep
LoopStep returns the loop step expression.
common/ast/expr.go:298
↓ 20 callersFunctionNewTypeTypeWithParam
NewTypeTypeWithParam creates a type with a type parameter. Used for type-checking purposes, but equivalent to TypeType otherwise.
common/types/types.go:593
↓ 20 callersFunctionOptionalOf
OptionalOf returns an optional value which wraps a concrete CEL value.
common/types/optional.go:35
↓ 20 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:530
↓ 20 callersMethodResult
Result returns the comprehension result expression.
common/ast/expr.go:301
↓ 19 callersMethodAddFunctions
AddFunctions configures the checker with a list of function declarations. If there are overlapping declarations, the method will error.
checker/env.go:126
↓ 19 callersMethodAsStructField
AsStructField casts the EntryExpr to a StructField The Kind() must be equal to StructFieldKind for the conversion to be well-defined.
common/ast/expr.go:150
↓ 19 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
↓ 19 callersFunctionIsUnknownOrError
IsUnknownOrError returns whether the input element ref.Val is an ErrType or UnknownType.
common/types/util.go:22
↓ 19 callersFunctionNewErrFromString
NewErrFromString creates a new Err with the provided message. TODO: Audit the use of this function and standardize the error messages and codes.
common/types/err.go:67
↓ 19 callersFunctionNewStaticOptimizer
NewStaticOptimizer creates a StaticOptimizer with a sequence of ASTOptimizer's to be applied to a checked expression.
cel/optimizer.go:45
↓ 19 callersMethodOptimize
Optimize applies a sequence of optimizations to an Ast within a given environment. If issues are encountered, the Issues.Err() return value will be n
cel/optimizer.go:76
↓ 19 callersMethodSet
(name string, value any)
cel/validator.go:152
↓ 19 callersMethodSourceInfo
SourceInfo returns character offset and newline position information about expression elements.
cel/env.go:84
↓ 19 callersMethodTypeName
TypeName returns the qualified type name of the type. The type name is also used as the type's identifier name at type-check and interpretation time.
common/types/ref/reference.go:32
↓ 19 callersFunctionmustNewExecutionFrame
(t testing.TB, input any)
interpreter/frame_test.go:587
↓ 18 callersMethodBindings
Bindings produces a set of function bindings, if any are defined.
common/decls/decls.go:343
↓ 18 callersMethodCELTypeAdapter
CELTypeAdapter returns the `types.Adapter` configured for the environment.
cel/env.go:782
↓ 18 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
↓ 18 callersFunctionCompare
Compare compares two strings, a for actual, e for expected, and returns true or false. The comparison is done, by filtering out whitespace (i.e. space
test/compare.go:24
↓ 18 callersMethodEval
Eval evaluates an Activation and produces an output.
interpreter/interpretable.go:35
↓ 18 callersMethodFindIdent
FindIdent takes a qualified identifier name and returns a ref.Val if one exists.
common/types/provider.go:48
↓ 18 callersMethodGetType
GetType returns the type for the expression at the given id, if one exists, else types.DynType.
common/ast/ast.go:51
↓ 18 callersMethodMultiply
Multiply returns the result of multiplying the current and input value.
common/types/traits/math.go:48
↓ 18 callersFunctionNewAttributeTrail
NewAttributeTrail creates a new simple attribute from a variable name.
common/types/unknown.go:34
↓ 18 callersFunctionNewStringSource
NewStringSource creates a new Source from the given contents and description.
common/source.go:84
↓ 18 callersMethodreportError
(ctx any, format string, args ...any)
parser/parser.go:905
↓ 17 callersMethodAccuVar
AccuVar returns the accumulation variable name.
common/ast/expr.go:289
↓ 17 callersMethodCompare
Compare this value to the input other value, returning an Int: this < other -> Int(-1) this == other -> Int(0) this > other -> Int(1) If the com
common/types/traits/comparer.go:32
↓ 17 callersMethodError
()
parser/parser.go:246
↓ 17 callersMethodFieldByName
FieldByName returns (FieldDescription, true) if the field name is declared within the type.
common/types/pb/type.go:109
↓ 17 callersMethodFindStructType
FindStructType returns the Type give a qualified type name. For historical reasons, only struct types are expected to be returned through this method
common/types/provider.go:57
↓ 17 callersFunctionName
Name sets the fully-qualified name of the Container.
common/containers/container.go:295
↓ 17 callersFunctionNewEnv
NewEnv returns a new *Env with the given parameters.
checker/env.go:81
↓ 17 callersFunctionNewStringList
NewStringList returns a traits.Lister containing only strings.
common/types/list.go:48
↓ 17 callersMethodSize
Size returns the length of the argument list.
ext/formatting.go:778
↓ 17 callersMethodVisit
Visitor implementations.
parser/parser.go:384
↓ 17 callersMethodcreateChild
(e Expr)
common/ast/navigable.go:374
↓ 17 callersMethodid
(ctx any)
parser/helper.go:155
↓ 17 callersFunctionmustAdaptToProto
(e ast.Expr)
cel/macro.go:561
↓ 17 callersFunctionmustTypeCheck
(t testing.TB, expr string, opts ...any)
common/ast/navigable_test.go:634
← previousnext →101–200 of 7,701, ranked by callers