Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cel-expr/cel-go
/ functions
Functions
7,701 in github.com/cel-expr/cel-go
⨍
Functions
7,701
◇
Types & classes
905
↓ 16 callers
Method
Add
Add one or more overloads, returning an error if any Overload has the same Overload#Name.
interpreter/dispatcher.go:26
↓ 16 callers
Method
Args
Args returns the normalized arguments to the function overload. For receiver-style functions, the receiver target is arg 0.
interpreter/interpretable.go:130
↓ 16 callers
Method
CELTypeProvider
CELTypeProvider returns the `types.Provider` configured for the environment.
cel/env.go:787
↓ 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
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:94
↓ 16 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:256
↓ 16 callers
Function
NewAttributePattern
NewAttributePattern produces a new mutable AttributePattern based on a variable name.
interpreter/attribute_patterns.go:54
↓ 16 callers
Function
NewContainer
NewContainer creates a new Container with the fully-qualified name.
common/containers/container.go:36
↓ 16 callers
Function
NewTypeDesc
NewTypeDesc describes a simple or complex type with parameters.
common/env/env.go:778
↓ 16 callers
Method
OptionalIndices
OptionalIndicies returns the list of optional indices in the list literal.
common/ast/expr.go:185
↓ 16 callers
Function
StdLib
StdLib returns an EnvOption for the standard library of CEL functions and macros.
cel/library.go:132
↓ 16 callers
Function
makeQualifier
(t testing.TB, attrs AttributeFactory, fieldType *types.Type, qualID int64, val any)
interpreter/attributes_test.go:1337
↓ 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:696
↓ 15 callers
Function
ComposeTypes
ComposeTypes accepts a provider, adapter, and a list of types (ref.Type, proto.Message, protoreflect.FileDescriptor, or RegistryOption) and either: -
common/types/provider.go:202
↓ 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:904
↓ 15 callers
Method
GetId
GetId returns the id rule contexts.
repl/parser/commands_parser.go:1568
↓ 15 callers
Method
IterVar
IterVar returns the iteration variable name. For one-variable comprehensions, the iter var refers to the element value when iterating over a list, or
common/ast/expr.go:278
↓ 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:146
↓ 15 callers
Method
NewInterpretable
NewInterpretable creates an InterpretableV2 from a checked expression and an optional list of PlannerOption values.
interpreter/interpreter.go:36
↓ 15 callers
Method
NewList
NewList creates a list literal instruction with an optional set of elements.
parser/macro.go:205
↓ 15 callers
Function
NewOptionalType
NewOptionalType creates an abstract parameterized type instance corresponding to CEL's notion of optional.
common/types/types.go:525
↓ 15 callers
Function
NewSourceInfo
NewSourceInfo creates a simple SourceInfo object from an input common.Source value.
common/ast/ast.go:201
↓ 15 callers
Function
ParseStructTag
ParseStructTag configures the struct tag to parse. The 0th item in the tag is used as the name of the CEL field.
common/types/native.go:78
↓ 15 callers
Method
RegisterMessage
RegisterMessage produces a `FileDescription` from a `message` and registers the message and all other definitions within the message file into the `pb
common/types/pb/pb.go:214
↓ 15 callers
Method
ResolveName
ResolveName returns a value from the activation by qualified name, or false if the name could not be found.
interpreter/activation.go:30
↓ 15 callers
Method
nextMacroID
()
parser/helper.go:333
↓ 15 callers
Function
rangedSizeEstimate
(min, max uint64)
ext/costs.go:88
↓ 15 callers
Function
safeAdd
(x, y uint64, rest ...uint64)
ext/costs.go:106
↓ 14 callers
Method
Clone
Clone makes a shallow copy of the tracker. The different clones can be used independently from each other.
interpreter/runtimecost.go:242
↓ 14 callers
Function
CostTracking
CostTracking enables cost tracking and registers a ActualCostEstimator that can optionally provide a runtime cost estimate for any function calls.
cel/options.go:813
↓ 14 callers
Method
EnterRule
(listener antlr.ParseTreeListener)
parser/gen/cel_parser.go:5919
↓ 14 callers
Method
ExitRule
(listener antlr.ParseTreeListener)
parser/gen/cel_parser.go:5925
↓ 14 callers
Function
FunctionBinding
FunctionBinding provides the implementation of a variadic overload. The provided function is protected by a runtime type-guard which ensures runtime t
cel/decls.go:343
↓ 14 callers
Method
IsAssignableType
IsAssignableType determines whether the current type is type-check assignable from the input fromType.
common/types/types.go:314
↓ 14 callers
Method
IterVar2
IterVar2 returns the second iteration variable name. When the value is non-empty, the comprehension is a two-variable comprehension.
common/ast/expr.go:283
↓ 14 callers
Function
NewErrors
NewErrors creates a new instance of the Errors type.
common/errors.go:32
↓ 14 callers
Function
NewPartialActivation
NewPartialActivation returns an Activation which contains a list of AttributePattern values representing field and index operations that should result
interpreter/activation.go:173
↓ 14 callers
Method
NewStruct
NewStruct creates an Expr value representing a struct literal with a given type name and a set of field initializers.
common/ast/factory.go:72
↓ 14 callers
Function
NewValidator
NewValidator returns a named Validator instance.
common/env/env.go:693
↓ 14 callers
Function
PostOrderVisit
PostOrderVisit walks the expression graph and calls the visitor in post-order (bottom-up).
common/ast/navigable.go:175
↓ 14 callers
Function
ValOrErr
ValOrErr either returns the existing error or creates a new one. TODO: Audit the use of this function and standardize the error messages and codes.
common/types/err.go:107
↓ 14 callers
Method
location
(e ast.Expr)
checker/checker.go:710
↓ 14 callers
Function
mustParseType
(t testing.TB, name string)
repl/evaluator_test.go:32
↓ 14 callers
Function
newFormatError
(id int64, msg string, args ...any)
ext/formatting.go:700
↓ 14 callers
Method
newID
(ctx any)
parser/helper.go:144
↓ 13 callers
Function
AsyncBinding
AsyncBinding provides the implementation of an asynchronous overload. The provided function is called in its own goroutine with the provided context.
cel/decls.go:365
↓ 13 callers
Method
Evaluate
Evaluate sets up a CEL evaluation using the current REPL context.
repl/evaluator.go:1461
↓ 13 callers
Function
ExprToProto
ExprToProto serializes an ast.Expr value to a protobuf Expr representation.
common/ast/conversion.go:282
↓ 13 callers
Method
ID
ID value corresponding to the expression node.
interpreter/interpretable.go:32
↓ 13 callers
Method
IsZeroValue
IsZeroValue indicates whether the object is the zero value for the type.
common/types/traits/zeroer.go:20
↓ 13 callers
Function
MaybeMergeUnknowns
MaybeMergeUnknowns determines whether an input value and another, possibly nil, unknown will produce an unknown result. If the input `val` is another
common/types/unknown.go:279
↓ 13 callers
Function
NewJSONList
NewJSONList returns a traits.Lister based on structpb.ListValue instance.
common/types/list.go:80
↓ 13 callers
Function
NewLibrarySubset
NewLibrarySubset returns an empty library subsetting config which permits all library features.
common/env/env.go:521
↓ 13 callers
Method
NewList
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
↓ 13 callers
Function
NewNullableType
NewNullableType creates an instance of a nullable type with the provided wrapped type. Note: only primitive types are supported as wrapped types.
common/types/types.go:509
↓ 13 callers
Function
NoSuchOverloadErr
NoSuchOverloadErr returns a new types.Err instance with a no such overload message.
common/types/err.go:89
↓ 13 callers
Method
OutputType
OutputType returns the output type of the expression if the Ast has been type-checked, else returns cel.DynType as the parse step cannot infer types.
cel/env.go:107
↓ 13 callers
Method
Path
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
checker/cost.go:61
↓ 13 callers
Method
ReferenceMap
ReferenceMap returns the map of expression id to identifier, constant, and function references.
common/ast/ast.go:87
↓ 13 callers
Method
ResolveCandidateNames
ResolveCandidateNames returns the candidates name of namespaced identifiers in C++ resolution order. Names which shadow other names are returned firs
common/containers/container.go:111
↓ 13 callers
Method
Slice
(i, j int)
common/runes/buffer.go:27
↓ 13 callers
Method
SourceInfo
SourceInfo returns the source metadata associated with the parse / type-check passes.
common/ast/ast.go:43
↓ 13 callers
Method
UpdateExpr
UpdateExpr updates the target expression with the updated content while preserving macro metadata. There are four scenarios during the update to cons
cel/optimizer.go:499
↓ 13 callers
Method
Validate
Validate validates a given Ast within an Environment and collects a set of potential issues. The ValidatorConfig is generated from the set of ASTVali
cel/validator.go:128
↓ 13 callers
Method
nextID
()
cel/optimizer.go:222
↓ 12 callers
Method
ActualCost
ActualCost returns the tracked cost through the course of execution when `CostTracking` is enabled. Otherwise, returns nil if the cost was not enabled
cel/program.go:157
↓ 12 callers
Method
AddIdents
AddIdents configures the checker with a list of variable declarations. If there are overlapping declarations, the method will error.
checker/env.go:115
↓ 12 callers
Function
EnableOptionalSyntax
EnableOptionalSyntax enables syntax for optional field and index selection.
parser/options.go:138
↓ 12 callers
Method
HasTrait
HasTrait returns whether the type has a given trait associated with it. See common/types/traits/traits.go for a list of supported traits.
common/types/ref/reference.go:27
↓ 12 callers
Function
NewConstantFoldingOptimizer
NewConstantFoldingOptimizer creates an optimizer which inlines constant scalar an aggregate literal values within function calls and select statements
cel/folding.go:62
↓ 12 callers
Method
NewError
NewError associates an error message with a given expression id.
parser/macro.go:294
↓ 12 callers
Method
NewMemberCall
NewMemberCall creates an Expr value representing a member function call.
common/ast/factory.go:37
↓ 12 callers
Method
OverloadDecls
OverloadDecls returns the overload declarations in the order in which they were declared.
common/decls/decls.go:310
↓ 12 callers
Method
Parent
Parent returns the parent expression node, if one exists.
common/ast/navigable.go:34
↓ 12 callers
Function
PartialVars
PartialVars returns a PartialActivation which contains variables and a set of AttributePattern values that indicate variables or parts of variables wh
cel/program.go:112
↓ 12 callers
Method
SpecifierFormat
SpecifierFormat returns the short text representation of the type. e.g. "map<string, int>"
common/env/env.go:874
↓ 12 callers
Method
TypeMap
TypeMap returns the map of expression ids to type-checked types. If the AST is not type-checked, the map will be empty.
common/ast/ast.go:69
↓ 12 callers
Function
asyncReturning
asyncReturning returns an AsyncOp that immediately produces the given value, while counting the number of times the implementation is invoked.
interpreter/async_test.go:40
↓ 12 callers
Function
mustAdaptToExpr
(e *exprpb.Expr)
cel/macro.go:540
↓ 12 callers
Function
mustProgram
mustProgram compiles an expression and constructs a Program, separating EnvOptions and ProgramOptions.
cel/program_async_test.go:931
↓ 12 callers
Function
testNativeEnv
testEnv initializes the test environment common to all tests.
ext/native_test.go:1275
↓ 12 callers
Function
testNativeEnv
testEnv initializes the test environment common to all tests.
common/types/native_test.go:1475
↓ 11 callers
Method
AccuIdentName
AccuIdentName returns the name of the accumulator identifier.
parser/macro.go:276
↓ 11 callers
Method
AsCELType
AsCELType converts the serializable object to a *types.Type value.
common/env/env.go:881
↓ 11 callers
Method
Expr
()
repl/parser/commands_parser.go:4558
↓ 11 callers
Function
ExprTypeToType
ExprTypeToType converts a protobuf CEL type representation to a CEL-native type representation.
common/types/types.go:678
↓ 11 callers
Method
FindFieldType
FieldFieldType returns the field type for a checked type value. Returns false if the field could not be found.
common/types/ref/provider.go:40
↓ 11 callers
Method
FindStructFieldType
FindStructFieldType returns the field type for a checked type value. Returns false if the field could not be found.
common/types/provider.go:65
↓ 11 callers
Method
GetMacroCall
GetMacroCall returns the original ast.Expr value for the given expression if it was generated via a macro replacement. Note, parsing options must be
common/ast/ast.go:329
↓ 11 callers
Method
GetName
GetName returns the fully qualified file path for the file.
common/types/pb/file.go:80
↓ 11 callers
Method
IsExactType
IsExactType indicates whether the two types are exactly the same. This check also verifies type parameter type names.
common/types/types.go:274
↓ 11 callers
Method
MaybeAttribute
MaybeAttribute creates an attribute that refers to either a field selection or a namespaced variable name. Only expressions which have not been type-
interpreter/attributes.go:49
↓ 11 callers
Function
MultilineDescription
MultilineDescription combines multiple lines into a newline separated string.
common/doc.go:68
↓ 11 callers
Function
NewConfig
NewConfig creates an instance of a YAML serializable CEL environment configuration.
common/env/env.go:30
↓ 11 callers
Function
NewJSONStruct
NewJSONStruct creates a traits.Mapper implementation backed by a JSON struct that has been encoded in protocol buffer form. The `adapter` argument pr
common/types/map.go:50
↓ 11 callers
Function
NewLocation
NewLocation creates a new location.
common/location.go:37
↓ 11 callers
Function
NewPartialAttributeFactory
NewPartialAttributeFactory returns an AttributeFactory implementation capable of performing AttributePattern matches with PartialActivation inputs.
interpreter/attribute_patterns.go:182
← previous
next →
201–300 of 7,701, ranked by callers