Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cel-expr/cel-go
/ functions
Functions
7,240 in github.com/cel-expr/cel-go
⨍
Functions
7,240
◇
Types & classes
842
↓ 26 callers
Function
NewVariable
NewVariable creates a new variable declaration.
common/decls/decls.go:937
↓ 26 callers
Method
Resolve
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 callers
Method
Target
Target returns the target of the expression if one is present.
common/ast/expr.go:170
↓ 25 callers
Method
AbsoluteAttribute
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 callers
Function
NewAST
NewAST creates a base AST instance with an ast.Expr and ast.SourceInfo value.
common/ast/ast.go:108
↓ 25 callers
Method
NewCall
NewCall creates a function call Expr value for a global (free) function.
parser/macro.go:279
↓ 24 callers
Method
AddQualifier
AddQualifier adds a qualifier on the Attribute or error if the qualification is not a valid qualifier type.
interpreter/attributes.go:105
↓ 24 callers
Function
AstToString
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 callers
Method
CopyAll
(ctx *UnaryContext)
parser/gen/cel_parser.go:1790
↓ 24 callers
Method
CopyAll
(ctx *UnaryContext)
repl/parser/commands_parser.go:5748
↓ 24 callers
Method
HasValue
HasValue returns true if the optional has a value.
common/types/optional.go:45
↓ 24 callers
Function
IsUnknownOrError
IsUnknownOrError returns whether the input element ref.Val is an ErrType or UnknownType.
common/types/util.go:22
↓ 24 callers
Function
NavigateAST
NavigateAST converts an AST to a NavigableExpr
common/ast/navigable.go:46
↓ 24 callers
Function
NewDb
NewDb creates a new `pb.Db` with an empty type name to file description map.
common/types/pb/pb.go:99
↓ 24 callers
Function
NewDynamicMap
NewDynamicMap returns a traits.Mapper value with dynamic key, value pairs.
common/types/map.go:36
↓ 24 callers
Function
NewEvaluator
NewEvaluator returns an inialized evaluator
repl/evaluator.go:537
↓ 24 callers
Method
Parameters
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 callers
Method
ToDisplayString
ToDisplayString decorates the error message with the source location.
common/error.go:46
↓ 23 callers
Method
DescribeType
DescribeType returns a `TypeDescription` for the `typeName` if it exists in the `pb.Db`.
common/types/pb/pb.go:235
↓ 23 callers
Method
Entries
Entries returns the map key value pairs as EntryExpr values.
common/ast/expr.go:215
↓ 23 callers
Method
FieldName
FieldName returns the field name being selected from the operand.
common/ast/expr.go:203
↓ 23 callers
Method
IsOptional
IsOptional indicates whether the given element index is optional.
common/ast/expr.go:188
↓ 23 callers
Function
MemberOverload
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 callers
Function
Strings
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 callers
Method
AsMapEntry
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 callers
Method
AsStruct
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 callers
Function
EnableMacroCallTracking
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 callers
Method
GetText
GetText implements (antlr.CharStream).GetText.
parser/input.go:94
↓ 22 callers
Method
IterRange
IterRange returns the iteration range expression.
common/ast/expr.go:269
↓ 22 callers
Function
NewOpaqueType
NewOpaqueType creates an abstract parameterized type with a given name.
common/types/types.go:530
↓ 22 callers
Method
RenumberIDs
RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids.
common/ast/expr.go:105
↓ 21 callers
Method
Close
Close releases the resources held by the execution frame and returns it to the pool.
interpreter/frame.go:104
↓ 21 callers
Function
IsUnknown
IsUnknown returns whether the element ref.Val is in instance of *types.Unknown
common/types/unknown.go:263
↓ 21 callers
Function
Macros
Macros adds the given macros to the parser.
parser/options.go:101
↓ 21 callers
Function
MemberOverload
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 callers
Function
NewParser
NewParser builds and returns a new Parser using the provided options.
parser/parser.go:42
↓ 21 callers
Method
Value
Value returns the observed value of the given expression id if found, and a nil false result if not.
interpreter/evalstate.go:28
↓ 20 callers
Method
AccuInit
AccuInit returns the accumulation variable initialization expression.
common/ast/expr.go:292
↓ 20 callers
Method
IsTestOnly
IsTestOnly indicates whether the select expression is a presence test generated by a macro.
common/ast/expr.go:206
↓ 20 callers
Method
LoopCondition
LoopCondition returns the loop condition expression.
common/ast/expr.go:295
↓ 20 callers
Method
NewLiteral
Literal creates an Expr value for a scalar literal value.
parser/macro.go:202
↓ 20 callers
Function
NewUnknown
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 callers
Function
OptionalOf
OptionalOf returns an optional value which wraps a concrete CEL value.
common/types/optional.go:35
↓ 20 callers
Method
Result
Result returns the comprehension result expression.
common/ast/expr.go:301
↓ 20 callers
Function
UnaryBinding
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 callers
Method
AsStructField
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 callers
Function
BinaryBinding
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 callers
Function
Bindings
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 callers
Function
LabelErrNode
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 callers
Method
LoopStep
LoopStep returns the loop step expression.
common/ast/expr.go:298
↓ 19 callers
Method
SourceInfo
SourceInfo returns character offset and newline position information about expression elements.
cel/env.go:79
↓ 18 callers
Method
AddFunctions
AddFunctions configures the checker with a list of function declarations. If there are overlapping declarations, the method will error.
checker/env.go:126
↓ 18 callers
Method
Eval
Eval evaluates an Activation and produces an output.
interpreter/interpretable.go:35
↓ 18 callers
Method
FieldByName
FieldByName returns (FieldDescription, true) if the field name is declared within the type.
common/types/pb/type.go:109
↓ 18 callers
Function
MatchDescendants
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 callers
Function
NewStringSource
NewStringSource creates a new Source from the given contents and description.
common/source.go:84
↓ 18 callers
Function
NewTypeTypeWithParam
NewTypeTypeWithParam creates a type with a type parameter. Used for type-checking purposes, but equivalent to TypeType otherwise.
common/types/types.go:593
↓ 18 callers
Method
Parse
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 callers
Method
Parse
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 callers
Method
reportError
(ctx any, format string, args ...any)
parser/parser.go:897
↓ 17 callers
Function
ASTValidators
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 callers
Method
Compare
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 callers
Method
Copy
Copy the input expression with a brand new set of identifiers.
cel/macro.go:59
↓ 17 callers
Method
Error
()
parser/parser.go:239
↓ 17 callers
Function
FixedCostEstimate
FixedCostEstimate returns a cost with a fixed min and max range.
checker/cost.go:179
↓ 17 callers
Function
Name
Name sets the fully-qualified name of the Container.
common/containers/container.go:295
↓ 17 callers
Function
NewEnv
NewEnv returns a new *Env with the given parameters.
checker/env.go:81
↓ 17 callers
Function
NewErrFromString
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 callers
Function
NewStringList
NewStringList returns a traits.Lister containing only strings.
common/types/list.go:48
↓ 17 callers
Method
Set
(name string, value any)
cel/validator.go:136
↓ 17 callers
Method
Visit
Visitor implementations.
parser/parser.go:376
↓ 17 callers
Method
createChild
(e Expr)
common/ast/navigable.go:351
↓ 17 callers
Function
estimateSize
(estimator checker.CostEstimator, node checker.AstNode)
ext/costs.go:52
↓ 17 callers
Method
id
(ctx any)
parser/helper.go:151
↓ 17 callers
Function
mustAdaptToProto
(e ast.Expr)
cel/macro.go:561
↓ 16 callers
Function
Check
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 callers
Method
Error
Error implements the error interface method.
interpreter/attributes.go:1463
↓ 16 callers
Method
Find
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 callers
Method
GetType
GetType returns the type for the expression at the given id, if one exists, else types.DynType.
common/ast/ast.go:51
↓ 16 callers
Function
Lib
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 callers
Function
NewContainer
NewContainer creates a new Container with the fully-qualified name.
common/containers/container.go:36
↓ 16 callers
Function
NewProtoRegistry
NewProtoRegistry creates a proto-based registry with a set of configurable options.
common/types/provider.go:127
↓ 16 callers
Function
NewTypeDesc
NewTypeDesc describes a simple or complex type with parameters.
common/env/env.go:778
↓ 16 callers
Method
Size
Size returns the length of the argument list.
ext/formatting.go:778
↓ 16 callers
Function
makeQualifier
(t testing.TB, attrs AttributeFactory, fieldType *types.Type, qualID int64, val any)
interpreter/attributes_test.go:1337
↓ 16 callers
Function
mustNewExecutionFrame
(t testing.TB, input any)
interpreter/frame_test.go:570
↓ 15 callers
Method
AccuVar
AccuVar returns the accumulation variable name.
common/ast/expr.go:289
↓ 15 callers
Method
AddLetVar
AddLetVar adds a let variable to the evaluation context. The expression is planned but evaluated lazily.
repl/evaluator.go:612
↓ 15 callers
Method
ArgTypes
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 callers
Method
CELTypeProvider
CELTypeProvider returns the `types.Provider` configured for the environment.
cel/env.go:712
↓ 15 callers
Method
Description
Description gives a brief description of the source. Example descriptions are a file name or ui element.
common/source.go:32
↓ 15 callers
Method
Function
Function name to match.
parser/macro.go:103
↓ 15 callers
Function
Functions
Functions returns the set of standard library function declarations and definitions for CEL.
common/stdlib/standard.go:890
↓ 15 callers
Method
GetId
GetId returns the id rule contexts.
repl/parser/commands_parser.go:1568
↓ 15 callers
Function
Macros
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 callers
Method
Merge
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 callers
Function
NewAttributeTrail
NewAttributeTrail creates a new simple attribute from a variable name.
common/types/unknown.go:33
↓ 15 callers
Method
NewList
NewList creates a list literal instruction with an optional set of elements.
parser/macro.go:205
↓ 15 callers
Function
NewStaticOptimizer
NewStaticOptimizer creates a StaticOptimizer with a sequence of ASTOptimizer's to be applied to a checked expression.
cel/optimizer.go:45
↓ 15 callers
Method
Optimize
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
← previous
next →
101–200 of 7,240, ranked by callers