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
↓ 337 callers
Method
Error
()
common/runes/buffer.go:123
↓ 211 callers
Method
Equal
Equal returns true if the `other` value has the same type and content as the implementing struct.
common/types/ref/reference.go:55
↓ 199 callers
Method
Err
Err returns an error value if the issues list contains one or more errors.
cel/env.go:994
↓ 179 callers
Method
Kind
Kind of the expression node. See ExprKind for the valid enum values.
common/ast/expr.go:62
↓ 156 callers
Method
ID
ID of the expression as it appears in the AST
common/ast/expr.go:59
↓ 153 callers
Method
Contains
Contains returns true if the value exists within the object.
common/types/traits/container.go:22
↓ 126 callers
Method
Program
Program generates an evaluable instance of the Ast within the environment (Env).
cel/env.go:689
↓ 125 callers
Method
Eval
Eval returns the result of an evaluation of the Ast and environment against the input vars. The vars value may either be an `Activation` or a `map[st
cel/program.go:45
↓ 123 callers
Function
NewEnv
NewEnv creates a program environment configured with the standard library of CEL functions and macros. The Env value returned can parse and check any
cel/env.go:340
↓ 120 callers
Method
New
New returns a mutable proto message
common/types/pb/type.go:144
↓ 117 callers
Method
ConvertToNative
ConvertToNative converts the Value to a native Go struct according to the reflected type description, or error if the conversion is not feasible. The
common/types/ref/reference.go:49
↓ 117 callers
Method
Value
Value returns the map entry value expression.
common/ast/expr.go:230
↓ 108 callers
Function
newTestRegistry
(t *testing.T, opts ...RegistryOption)
common/types/provider_test.go:942
↓ 107 callers
Function
Variable
Variable creates an instance of a variable declaration with a variable name and type.
cel/decls.go:144
↓ 105 callers
Function
IsError
IsError returns whether the input element ref.Type or ref.Val is equal to the ErrType singleton.
common/types/err.go:171
↓ 101 callers
Method
NativeToValue
NativeToValue converts the input `value` to a CEL `ref.Val`.
common/types/ref/provider.go:56
↓ 86 callers
Method
Compile
()
repl/parser/commands_parser.go:533
↓ 78 callers
Method
TypeName
TypeName returns the struct type name.
common/ast/expr.go:242
↓ 77 callers
Method
String
String takes a ref.Val and a string representing the current locale identifier and returns the Val formatted as a string, or an error if one occurred.
ext/formatting.go:742
↓ 71 callers
Function
NewErr
NewErr creates a new Err described by the format string and args. TODO: Audit the use of this function and standardize the error messages and codes.
common/types/err.go:61
↓ 67 callers
Method
AsCall
AsCall adapts the expr into a CallExpr The Kind() must be equal to a CallKind for the conversion to be well-defined.
common/ast/expr.go:67
↓ 62 callers
Method
Error
Error implements error.
ext/formatting.go:708
↓ 61 callers
Function
NoVars
NoVars returns an empty Activation.
cel/program.go:83
↓ 61 callers
Method
Type
Type returns the deduced type of the AstNode.
checker/cost.go:64
↓ 61 callers
Function
testEnv
(t testing.TB, opts ...EnvOption)
cel/cel_test.go:3982
↓ 59 callers
Method
ReportError
ReportError records an error at a source location.
common/errors.go:45
↓ 56 callers
Method
Add
Add returns a combination of the current value and other value. If the other value is an unsupported type, an error is returned.
common/types/traits/math.go:24
↓ 55 callers
Method
Get
Get the value at the specified index or error.
common/types/traits/indexer.go:24
↓ 55 callers
Method
GetState
GetState retrieves the stateful metadata from the execution frame.
interpreter/interpreter.go:50
↓ 54 callers
Function
Function
Function defines a function and overloads with optional singleton or per-overload bindings. Using Function is roughly equivalent to calling Declarati
cel/decls.go:195
↓ 54 callers
Method
Recover
(recognizer antlr.Parser, e antlr.RecognitionException)
parser/parser.go:287
↓ 51 callers
Function
MaybeNoSuchOverloadErr
MaybeNoSuchOverloadErr returns the error or unknown if the input ref.Val is one of these types, else a new no such overload error.
common/types/err.go:101
↓ 50 callers
Method
Name
Name returns the name of the field.
common/ast/expr.go:254
↓ 50 callers
Method
Parse
()
repl/parser/commands_parser.go:534
↓ 49 callers
Method
Expr
Expr returns the expression of the AstNode.
checker/cost.go:67
↓ 48 callers
Method
Compile
Compile combines the Parse and Check phases CEL program compilation to produce an Ast and associated issues. If an error is encountered during parsin
cel/env.go:456
↓ 48 callers
Method
Match
Match returns true if the pattern matches the current value.
common/types/traits/matcher.go:22
↓ 47 callers
Method
ID
ID where the qualifier appears within an expression.
interpreter/attributes.go:69
↓ 45 callers
Method
Args
Args returns the list of call arguments, excluding the target.
common/ast/expr.go:173
↓ 45 callers
Method
AsLiteral
AsLiteral adapts the expr into a constant ref.Val. The Kind() must be equal to a LiteralKind for the conversion to be well-defined.
common/ast/expr.go:82
↓ 45 callers
Method
Get
(i int)
common/runes/buffer.go:26
↓ 44 callers
Method
Descriptor
Descriptor returns the protoreflect.FieldDescriptor for this type.
common/types/pb/type.go:243
↓ 43 callers
Function
NewCustomEnv
NewCustomEnv creates a custom program environment which is not automatically configured with the standard library of functions and macros documented i
cel/env.go:363
↓ 42 callers
Method
Len
()
common/runes/buffer.go:28
↓ 42 callers
Function
NewFunction
NewFunction creates a new function declaration with a set of function options to configure overloads and function definitions (implementations). Func
common/decls/decls.go:36
↓ 41 callers
Method
FunctionName
FunctionName returns the name of the function.
common/ast/expr.go:164
↓ 41 callers
Method
ReportErrorAtID
ReportErrorAtID logs an error during parsing which is included in the issue set returned from a failed parse.
policy/parser.go:423
↓ 41 callers
Function
WrapErr
WrapErr wraps an existing Go error value into a CEL Err value.
common/types/err.go:115
↓ 40 callers
Function
NewActivation
NewActivation returns an activation based on a map-based binding where the map keys are expected to be qualified names used with ResolveName calls. T
interpreter/activation.go:61
↓ 39 callers
Method
AsList
AsList adapts the expr into a ListExpr. The Kind() must be equal to a ListKind for the conversion to be well-defined.
common/ast/expr.go:87
↓ 39 callers
Function
Overload
Overload defines a new global overload with an overload id, argument types, and result type. Through the use of OverloadOpt options, the overload may
cel/decls.go:303
↓ 38 callers
Method
AsIdent
AsIdent adapts the expr into an identifier string. The Kind() must be equal to an IdentKind for the conversion to be well-defined.
common/ast/expr.go:77
↓ 38 callers
Method
Extend
Extend the current environment with additional options to produce a new Env. Note, the extended Env value should not share memory with the original.
cel/env.go:491
↓ 38 callers
Method
NewLiteral
NewLiteral creates an Expr value representing a literal value, such as a string or integer.
common/ast/factory.go:50
↓ 38 callers
Function
NewTypeParamType
NewTypeParamType creates a parameterized type instance.
common/types/types.go:584
↓ 38 callers
Function
Overload
Overload defines a new global overload with an overload id, argument types, and result type. Through the use of OverloadOpt options, the overload may
common/decls/decls.go:547
↓ 38 callers
Method
Size
Size returns the number of entries in the map.
common/ast/expr.go:218
↓ 37 callers
Function
EvalOptions
EvalOptions sets one or more evaluation options which may affect the evaluation or Result.
cel/options.go:720
↓ 37 callers
Method
LA
LA implements (antlr.CharStream).LA.
parser/input.go:38
↓ 37 callers
Method
Name
Name returns the name of the validator. Names must be unique.
cel/validator.go:102
↓ 37 callers
Function
OptionalTypes
OptionalTypes enable support for optional syntax and types in CEL. The optional value type makes it possible to express whether variables have been p
cel/library.go:361
↓ 37 callers
Function
ProtoTypeDefs
ProtoTypeDefs creates a RegistryOption which registers the individual proto messages with the registry.
common/types/provider.go:114
↓ 35 callers
Method
AsComprehension
AsComprehension adapts the expr into a ComprehensionExpr. The Kind() must be equal to a ComprehensionKind for the conversion to be well-defined.
common/ast/expr.go:72
↓ 35 callers
Method
AsSelect
AsSelect adapts the expr into a SelectExpr. The Kind() must be equal to a SelectKind for the conversion to be well-defined.
common/ast/expr.go:97
↓ 35 callers
Function
NewExprFactory
NewExprFactory creates an ExprFactory instance.
common/ast/factory.go:89
↓ 35 callers
Function
NewListType
NewListType creates an instances of a list type value with the provided element type.
common/types/types.go:480
↓ 35 callers
Function
Types
Types adds one or more type declarations to the environment, allowing for construction of type-literals whose definitions are included in the common e
cel/options.go:333
↓ 35 callers
Function
newTestRegistry
(t testing.TB, opts ...types.RegistryOption)
interpreter/interpreter_test.go:2387
↓ 34 callers
Method
EnterRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1088
↓ 34 callers
Method
ExitRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1094
↓ 34 callers
Function
NewAttributeFactory
NewAttributeFactory returns a default AttributeFactory which is produces Attribute values capable of resolving types by simple names and qualify the v
interpreter/attributes.go:144
↓ 34 callers
Method
ProtoReflect
()
test/proto2pb/test_all_types.pb.go:763
↓ 33 callers
Method
Check
Check performs type-checking on the input Ast and yields a checked Ast and/or set of Issues. If any `ASTValidators` are configured on the environment,
cel/env.go:397
↓ 33 callers
Method
Exec
Exec evaluates the expression within the given ExecutionFrame.
interpreter/interpretable.go:46
↓ 32 callers
Function
AsFrame
AsFrame promotes an Activation to an ExecutionFrame.
interpreter/interpretable.go:199
↓ 32 callers
Method
ConvertToType
ConvertToType supports type conversions between CEL value types supported by the expression language.
common/types/ref/reference.go:52
↓ 32 callers
Method
IsMemberFunction
IsMemberFunction returns whether the call has a non-nil target indicating it is a member function
common/ast/expr.go:167
↓ 31 callers
Method
Elements
Elements returns the list elements as navigable expressions.
common/ast/expr.go:182
↓ 31 callers
Function
NewDynamicList
NewDynamicList returns a traits.Lister with heterogenous elements. value should be an array of "native" types, i.e. any type that NativeToValue() can
common/types/list.go:35
↓ 31 callers
Method
Next
Next returns the next element.
common/types/traits/iterator.go:35
↓ 30 callers
Method
Fields
Fields returns the set of field initializers in the struct expression as EntryExpr values.
common/ast/expr.go:245
↓ 30 callers
Method
GetValue
GetValue returns the wrapped value contained in the optional.
common/types/optional.go:50
↓ 30 callers
Method
NativeRep
NativeRep converts the AST to a Go-native representation.
cel/env.go:54
↓ 30 callers
Method
NewIdent
NewIdent creates an Expr value representing an identifier.
common/ast/factory.go:40
↓ 30 callers
Function
NewMapType
NewMapType creates an instance of a map type value with the provided key and value types.
common/types/types.go:494
↓ 30 callers
Method
Operand
Operand returns the selection operand expression.
common/ast/expr.go:200
↓ 30 callers
Method
Value
Value returns the raw value of the instance which may not be directly compatible with the expression language types.
common/types/ref/reference.go:62
↓ 29 callers
Function
EmptyActivation
EmptyActivation returns a variable-free activation.
interpreter/activation.go:38
↓ 29 callers
Method
GetErrors
GetErrors returns the list of observed errors.
common/errors.go:69
↓ 29 callers
Method
Iterator
Iterator returns an Iterator over the map key set.
common/types/map.go:126
↓ 29 callers
Method
Key
Key returns the map entry key expression.
common/ast/expr.go:227
↓ 29 callers
Function
NewTextSource
TODO(jimlarson) "Character offsets" should index the code points within the UTF-8 encoded string. It currently indexes bytes. Can be accomplished by
common/source.go:73
↓ 28 callers
Method
NewCall
NewCall creates an Expr value representing a global function call.
common/ast/factory.go:28
↓ 28 callers
Method
Type
Type returns the TypeValue of the value.
common/types/ref/reference.go:58
↓ 27 callers
Function
NewConstValue
NewConstValue creates a new constant valued Interpretable.
interpreter/interpretable.go:299
↓ 27 callers
Function
NewObjectType
NewObjectType creates a type reference to an externally defined type, e.g. a protobuf message type. An object type is assumed to support field presen
common/types/types.go:542
↓ 27 callers
Method
Size
Size returns the number of elements or length of the value.
common/types/traits/sizer.go:24
↓ 26 callers
Method
AsMap
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 callers
Function
Container
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:253
↓ 26 callers
Method
HasNext
HasNext returns true if there are unvisited elements in the Iterator.
common/types/traits/iterator.go:32
next →
1–100 of 7,240, ranked by callers