MCPcopy Create free account

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

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

↓ 26 callersFunctionNewVariable
NewVariable creates a new variable declaration.
common/decls/decls.go:937
↓ 26 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
↓ 26 callersMethodTarget
Target returns the target of the expression if one is present.
common/ast/expr.go:170
↓ 25 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
↓ 25 callersFunctionNewAST
NewAST creates a base AST instance with an ast.Expr and ast.SourceInfo value.
common/ast/ast.go:108
↓ 25 callersMethodNewCall
NewCall creates a function call Expr value for a global (free) function.
parser/macro.go:279
↓ 24 callersMethodAddQualifier
AddQualifier adds a qualifier on the Attribute or error if the qualification is not a valid qualifier type.
interpreter/attributes.go:105
↓ 24 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:101
↓ 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 callersFunctionIsUnknownOrError
IsUnknownOrError returns whether the input element ref.Val is an ErrType or UnknownType.
common/types/util.go:22
↓ 24 callersFunctionNavigateAST
NavigateAST converts an AST to a NavigableExpr
common/ast/navigable.go:46
↓ 24 callersFunctionNewDb
NewDb creates a new `pb.Db` with an empty type name to file description map.
common/types/pb/pb.go:99
↓ 24 callersFunctionNewDynamicMap
NewDynamicMap returns a traits.Mapper value with dynamic key, value pairs.
common/types/map.go:36
↓ 24 callersFunctionNewEvaluator
NewEvaluator returns an inialized evaluator
repl/evaluator.go:537
↓ 24 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
↓ 24 callersMethodToDisplayString
ToDisplayString decorates the error message with the source location.
common/error.go:46
↓ 23 callersMethodDescribeType
DescribeType returns a `TypeDescription` for the `typeName` if it exists in the `pb.Db`.
common/types/pb/pb.go:235
↓ 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 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:559
↓ 23 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
↓ 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 callersFunctionEnableMacroCallTracking
EnableMacroCallTracking ensures that call expressions which are replaced by macros are tracked in the `SourceInfo` of parsed and checked expressions.
cel/options.go:896
↓ 22 callersMethodGetText
GetText implements (antlr.CharStream).GetText.
parser/input.go:94
↓ 22 callersMethodIterRange
IterRange returns the iteration range expression.
common/ast/expr.go:269
↓ 22 callersFunctionNewOpaqueType
NewOpaqueType creates an abstract parameterized type with a given name.
common/types/types.go:530
↓ 22 callersMethodRenumberIDs
RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids.
common/ast/expr.go:105
↓ 21 callersMethodClose
Close releases the resources held by the execution frame and returns it to the pool.
interpreter/frame.go:104
↓ 21 callersFunctionIsUnknown
IsUnknown returns whether the element ref.Val is in instance of *types.Unknown
common/types/unknown.go:263
↓ 21 callersFunctionMacros
Macros adds the given macros to the parser.
parser/options.go:101
↓ 21 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:313
↓ 21 callersFunctionNewParser
NewParser builds and returns a new Parser using the provided options.
parser/parser.go:42
↓ 21 callersMethodValue
Value returns the observed value of the given expression id if found, and a nil false result if not.
interpreter/evalstate.go:28
↓ 20 callersMethodAccuInit
AccuInit returns the accumulation variable initialization expression.
common/ast/expr.go:292
↓ 20 callersMethodIsTestOnly
IsTestOnly indicates whether the select expression is a presence test generated by a macro.
common/ast/expr.go:206
↓ 20 callersMethodLoopCondition
LoopCondition returns the loop condition expression.
common/ast/expr.go:295
↓ 20 callersMethodNewLiteral
Literal creates an Expr value for a scalar literal value.
parser/macro.go:202
↓ 20 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:155
↓ 20 callersFunctionOptionalOf
OptionalOf returns an optional value which wraps a concrete CEL value.
common/types/optional.go:35
↓ 20 callersMethodResult
Result returns the comprehension result expression.
common/ast/expr.go:301
↓ 20 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:327
↓ 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:333
↓ 19 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
↓ 19 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
↓ 19 callersMethodLoopStep
LoopStep returns the loop step expression.
common/ast/expr.go:298
↓ 19 callersMethodSourceInfo
SourceInfo returns character offset and newline position information about expression elements.
cel/env.go:79
↓ 18 callersMethodAddFunctions
AddFunctions configures the checker with a list of function declarations. If there are overlapping declarations, the method will error.
checker/env.go:126
↓ 18 callersMethodEval
Eval evaluates an Activation and produces an output.
interpreter/interpretable.go:35
↓ 18 callersMethodFieldByName
FieldByName returns (FieldDescription, true) if the field name is declared within the type.
common/types/pb/type.go:109
↓ 18 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
↓ 18 callersFunctionNewStringSource
NewStringSource creates a new Source from the given contents and description.
common/source.go:84
↓ 18 callersFunctionNewTypeTypeWithParam
NewTypeTypeWithParam creates a type with a type parameter. Used for type-checking purposes, but equivalent to TypeType otherwise.
common/types/types.go:593
↓ 18 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
↓ 18 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:665
↓ 18 callersMethodreportError
(ctx any, format string, args ...any)
parser/parser.go:897
↓ 17 callersFunctionASTValidators
ASTValidators configures a set of ASTValidator instances into the target environment. Validators are applied in the order in which the are specified
cel/validator.go:85
↓ 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 callersMethodCopy
Copy the input expression with a brand new set of identifiers.
cel/macro.go:59
↓ 17 callersMethodError
()
parser/parser.go:239
↓ 17 callersFunctionFixedCostEstimate
FixedCostEstimate returns a cost with a fixed min and max range.
checker/cost.go:179
↓ 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 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
↓ 17 callersFunctionNewStringList
NewStringList returns a traits.Lister containing only strings.
common/types/list.go:48
↓ 17 callersMethodSet
(name string, value any)
cel/validator.go:136
↓ 17 callersMethodVisit
Visitor implementations.
parser/parser.go:376
↓ 17 callersMethodcreateChild
(e Expr)
common/ast/navigable.go:351
↓ 17 callersFunctionestimateSize
(estimator checker.CostEstimator, node checker.AstNode)
ext/costs.go:52
↓ 17 callersMethodid
(ctx any)
parser/helper.go:151
↓ 17 callersFunctionmustAdaptToProto
(e ast.Expr)
cel/macro.go:561
↓ 16 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
↓ 16 callersMethodError
Error implements the error interface method.
interpreter/attributes.go:1463
↓ 16 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:123
↓ 16 callersMethodGetType
GetType returns the type for the expression at the given id, if one exists, else types.DynType.
common/ast/ast.go:51
↓ 16 callersFunctionLib
Lib creates an EnvOption out of a Library, allowing libraries to be provided as functional args, and to be linked to each other.
cel/library.go:93
↓ 16 callersFunctionNewContainer
NewContainer creates a new Container with the fully-qualified name.
common/containers/container.go:36
↓ 16 callersFunctionNewProtoRegistry
NewProtoRegistry creates a proto-based registry with a set of configurable options.
common/types/provider.go:127
↓ 16 callersFunctionNewTypeDesc
NewTypeDesc describes a simple or complex type with parameters.
common/env/env.go:778
↓ 16 callersMethodSize
Size returns the length of the argument list.
ext/formatting.go:778
↓ 16 callersFunctionmakeQualifier
(t testing.TB, attrs AttributeFactory, fieldType *types.Type, qualID int64, val any)
interpreter/attributes_test.go:1337
↓ 16 callersFunctionmustNewExecutionFrame
(t testing.TB, input any)
interpreter/frame_test.go:570
↓ 15 callersMethodAccuVar
AccuVar returns the accumulation variable name.
common/ast/expr.go:289
↓ 15 callersMethodAddLetVar
AddLetVar adds a let variable to the evaluation context. The expression is planned but evaluated lazily.
repl/evaluator.go:612
↓ 15 callersMethodArgTypes
ArgTypes contains the set of argument types expected by the overload. For member functions ArgTypes[0] represents the member operand type.
common/decls/decls.go:652
↓ 15 callersMethodCELTypeProvider
CELTypeProvider returns the `types.Provider` configured for the environment.
cel/env.go:712
↓ 15 callersMethodDescription
Description gives a brief description of the source. Example descriptions are a file name or ui element.
common/source.go:32
↓ 15 callersMethodFunction
Function name to match.
parser/macro.go:103
↓ 15 callersFunctionFunctions
Functions returns the set of standard library function declarations and definitions for CEL.
common/stdlib/standard.go:890
↓ 15 callersMethodGetId
GetId returns the id rule contexts.
repl/parser/commands_parser.go:1568
↓ 15 callersFunctionMacros
Macros option extends the macro set configured in the environment. Note: This option must be specified after ClearMacros if used together.
cel/options.go:241
↓ 15 callersMethodMerge
Merge combines an existing function declaration with another. If a function is extended, by say adding new overloads to an existing function, then it
common/decls/decls.go:142
↓ 15 callersFunctionNewAttributeTrail
NewAttributeTrail creates a new simple attribute from a variable name.
common/types/unknown.go:33
↓ 15 callersMethodNewList
NewList creates a list literal instruction with an optional set of elements.
parser/macro.go:205
↓ 15 callersFunctionNewStaticOptimizer
NewStaticOptimizer creates a StaticOptimizer with a sequence of ASTOptimizer's to be applied to a checked expression.
cel/optimizer.go:45
↓ 15 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
← previousnext →101–200 of 7,240, ranked by callers