MCPcopy Create free account

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

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

↓ 273 callersMethodError
()
common/runes/buffer.go:123
↓ 224 callersMethodEqual
Equal returns true if the `other` value has the same type and content as the implementing struct.
common/types/ref/reference.go:55
↓ 222 callersMethodErr
Err returns an error value if the issues list contains one or more errors.
cel/env.go:1030
↓ 193 callersMethodKind
Kind of the expression node. See ExprKind for the valid enum values.
common/ast/expr.go:62
↓ 170 callersMethodContains
Contains returns true if the value exists within the object.
common/types/traits/container.go:22
↓ 163 callersMethodID
ID of the expression as it appears in the AST
common/ast/expr.go:59
↓ 161 callersMethodEval
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:47
↓ 141 callersFunctionNewEnv
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:344
↓ 138 callersFunctionVariable
Variable creates an instance of a variable declaration with a variable name and type.
cel/decls.go:144
↓ 134 callersMethodProgram
Program generates an evaluable instance of the Ast within the environment (Env).
cel/env.go:716
↓ 130 callersMethodNew
New returns a mutable proto message
common/types/pb/type.go:144
↓ 126 callersFunctionIsError
IsError returns whether the input element ref.Type or ref.Val is equal to the ErrType singleton.
common/types/err.go:171
↓ 119 callersMethodValue
Value returns the map entry value expression.
common/ast/expr.go:230
↓ 117 callersMethodConvertToNative
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
↓ 108 callersFunctionnewTestRegistry
(t *testing.T, opts ...RegistryOption)
common/types/provider_test.go:942
↓ 102 callersMethodNativeToValue
NativeToValue converts the input `value` to a CEL `ref.Val`.
common/types/ref/provider.go:56
↓ 88 callersMethodCompile
()
repl/parser/commands_parser.go:533
↓ 87 callersFunctionNoVars
NoVars returns an empty Activation.
cel/program.go:100
↓ 84 callersMethodError
()
cel/async/async_test.go:34
↓ 80 callersMethodString
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
↓ 78 callersFunctionNewErr
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
↓ 78 callersMethodTypeName
TypeName returns the struct type name.
common/ast/expr.go:242
↓ 77 callersMethodAdd
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
↓ 68 callersMethodType
Type returns the deduced type of the AstNode.
checker/cost.go:64
↓ 67 callersMethodAsCall
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
↓ 67 callersFunctionFunction
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
↓ 65 callersMethodError
Error implements error.
ext/formatting.go:708
↓ 62 callersFunctiontestEnv
(t testing.TB, opts ...EnvOption)
cel/cel_test.go:4088
↓ 59 callersMethodReportError
ReportError records an error at a source location.
common/errors.go:45
↓ 57 callersMethodCompile
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:483
↓ 55 callersMethodGet
Get the value at the specified index or error.
common/types/traits/indexer.go:24
↓ 55 callersMethodGetState
GetState retrieves the stateful metadata from the execution frame.
interpreter/interpreter.go:50
↓ 54 callersMethodParse
()
repl/parser/commands_parser.go:534
↓ 54 callersMethodRecover
(recognizer antlr.Parser, e antlr.RecognitionException)
parser/parser.go:294
↓ 53 callersMethodName
Name returns the name of the field.
common/ast/expr.go:254
↓ 51 callersMethodExpr
Expr returns the expression of the AstNode.
checker/cost.go:67
↓ 51 callersFunctionMaybeNoSuchOverloadErr
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
↓ 51 callersFunctionOverload
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
↓ 49 callersFunctionNewFunction
NewFunction creates a new function declaration with a set of function options to configure overloads and function definitions (implementations). Func
common/decls/decls.go:37
↓ 48 callersMethodAsLiteral
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
↓ 48 callersMethodID
ID where the qualifier appears within an expression.
interpreter/attributes.go:69
↓ 48 callersMethodMatch
Match returns true if the pattern matches the current value.
common/types/traits/matcher.go:22
↓ 46 callersMethodGet
(i int)
common/runes/buffer.go:26
↓ 46 callersFunctionWrapErr
WrapErr wraps an existing Go error value into a CEL Err value.
common/types/err.go:115
↓ 45 callersMethodArgs
Args returns the list of call arguments, excluding the target.
common/ast/expr.go:173
↓ 45 callersFunctionOverload
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:579
↓ 44 callersMethodDescriptor
Descriptor returns the protoreflect.FieldDescriptor for this type.
common/types/pb/type.go:243
↓ 43 callersFunctionNewCustomEnv
NewCustomEnv creates a custom program environment which is not automatically configured with the standard library of functions and macros documented i
cel/env.go:367
↓ 42 callersMethodAsIdent
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
↓ 42 callersFunctionEvalOptions
EvalOptions sets one or more evaluation options which may affect the evaluation or Result.
cel/options.go:732
↓ 42 callersMethodLen
()
common/runes/buffer.go:28
↓ 42 callersFunctionNewActivation
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
↓ 42 callersMethodReportErrorAtID
ReportErrorAtID logs an error during parsing which is included in the issue set returned from a failed parse.
policy/parser.go:423
↓ 41 callersMethodExtend
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:518
↓ 41 callersMethodFunctionName
FunctionName returns the name of the function.
common/ast/expr.go:164
↓ 40 callersMethodAsList
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
↓ 40 callersMethodNewLiteral
NewLiteral creates an Expr value representing a literal value, such as a string or integer.
common/ast/factory.go:50
↓ 40 callersFunctionOptionalTypes
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
↓ 40 callersFunctionnewTestRegistry
(t testing.TB, opts ...types.RegistryOption)
interpreter/interpreter_test.go:2574
↓ 39 callersMethodCheck
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:401
↓ 38 callersFunctionEmptyActivation
EmptyActivation returns a variable-free activation.
interpreter/activation.go:38
↓ 38 callersMethodName
Name returns the name of the validator. Names must be unique.
cel/validator.go:129
↓ 38 callersFunctionNewTypeParamType
NewTypeParamType creates a parameterized type instance.
common/types/types.go:584
↓ 38 callersMethodSize
Size returns the number of entries in the map.
common/ast/expr.go:218
↓ 38 callersFunctionTypes
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:345
↓ 37 callersMethodAsComprehension
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
↓ 37 callersMethodLA
LA implements (antlr.CharStream).LA.
parser/input.go:38
↓ 37 callersFunctionProtoTypeDefs
ProtoTypeDefs creates a RegistryOption which registers the individual proto messages with the registry.
common/types/provider.go:114
↓ 36 callersMethodExec
Exec evaluates the expression within the given ExecutionFrame.
interpreter/interpretable.go:46
↓ 36 callersFunctionNewAttributeFactory
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
↓ 36 callersFunctionNewExprFactory
NewExprFactory creates an ExprFactory instance.
common/ast/factory.go:89
↓ 35 callersMethodAsSelect
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 callersFunctionNewListType
NewListType creates an instances of a list type value with the provided element type.
common/types/types.go:480
↓ 34 callersMethodConvertToType
ConvertToType supports type conversions between CEL value types supported by the expression language.
common/types/ref/reference.go:52
↓ 34 callersMethodEnterRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1088
↓ 34 callersMethodExitRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1094
↓ 34 callersMethodProtoReflect
()
test/proto2pb/test_all_types.pb.go:763
↓ 33 callersFunctionAsFrame
AsFrame promotes an Activation to an ExecutionFrame.
interpreter/interpretable.go:199
↓ 33 callersFunctionIsUnknown
IsUnknown returns whether the element ref.Val is in instance of *types.Unknown
common/types/unknown.go:264
↓ 32 callersFunctionCompile
Compile is a convenience function that constructs a new Env using the provided EnvOption values, compiles the expression string, and plans an executab
cel/cel.go:26
↓ 32 callersMethodElements
Elements returns the list elements as navigable expressions.
common/ast/expr.go:182
↓ 32 callersMethodIsMemberFunction
IsMemberFunction returns whether the call has a non-nil target indicating it is a member function
common/ast/expr.go:167
↓ 31 callersMethodGetErrors
GetErrors returns the list of observed errors.
common/errors.go:69
↓ 31 callersMethodNativeRep
NativeRep converts the AST to a Go-native representation.
cel/env.go:58
↓ 31 callersFunctionNewDynamicList
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 callersMethodNewIdent
NewIdent creates an Expr value representing an identifier.
common/ast/factory.go:40
↓ 31 callersFunctionNewTextSource
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
↓ 31 callersMethodNext
Next returns the next element.
common/types/traits/iterator.go:35
↓ 30 callersMethodFields
Fields returns the set of field initializers in the struct expression as EntryExpr values.
common/ast/expr.go:245
↓ 30 callersMethodGetValue
GetValue returns the wrapped value contained in the optional.
common/types/optional.go:50
↓ 30 callersMethodNewCall
NewCall creates an Expr value representing a global function call.
common/ast/factory.go:28
↓ 30 callersFunctionNewMapType
NewMapType creates an instance of a map type value with the provided key and value types.
common/types/types.go:494
↓ 30 callersMethodOperand
Operand returns the selection operand expression.
common/ast/expr.go:200
↓ 30 callersMethodValue
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 callersMethodClose
Close releases the resources held by the execution frame and returns it to the pool.
interpreter/frame.go:117
↓ 29 callersMethodIterator
Iterator returns an Iterator over the map key set.
common/types/map.go:126
↓ 29 callersMethodKey
Key returns the map entry key expression.
common/ast/expr.go:227
↓ 29 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
↓ 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
next →1–100 of 7,546, ranked by callers