MCPcopy Create free account

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

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

↓ 337 callersMethodError
()
common/runes/buffer.go:123
↓ 211 callersMethodEqual
Equal returns true if the `other` value has the same type and content as the implementing struct.
common/types/ref/reference.go:55
↓ 199 callersMethodErr
Err returns an error value if the issues list contains one or more errors.
cel/env.go:994
↓ 179 callersMethodKind
Kind of the expression node. See ExprKind for the valid enum values.
common/ast/expr.go:62
↓ 156 callersMethodID
ID of the expression as it appears in the AST
common/ast/expr.go:59
↓ 153 callersMethodContains
Contains returns true if the value exists within the object.
common/types/traits/container.go:22
↓ 126 callersMethodProgram
Program generates an evaluable instance of the Ast within the environment (Env).
cel/env.go:689
↓ 125 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:45
↓ 123 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:340
↓ 120 callersMethodNew
New returns a mutable proto message
common/types/pb/type.go:144
↓ 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
↓ 117 callersMethodValue
Value returns the map entry value expression.
common/ast/expr.go:230
↓ 108 callersFunctionnewTestRegistry
(t *testing.T, opts ...RegistryOption)
common/types/provider_test.go:942
↓ 107 callersFunctionVariable
Variable creates an instance of a variable declaration with a variable name and type.
cel/decls.go:144
↓ 105 callersFunctionIsError
IsError returns whether the input element ref.Type or ref.Val is equal to the ErrType singleton.
common/types/err.go:171
↓ 101 callersMethodNativeToValue
NativeToValue converts the input `value` to a CEL `ref.Val`.
common/types/ref/provider.go:56
↓ 86 callersMethodCompile
()
repl/parser/commands_parser.go:533
↓ 78 callersMethodTypeName
TypeName returns the struct type name.
common/ast/expr.go:242
↓ 77 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
↓ 71 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
↓ 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
↓ 62 callersMethodError
Error implements error.
ext/formatting.go:708
↓ 61 callersFunctionNoVars
NoVars returns an empty Activation.
cel/program.go:83
↓ 61 callersMethodType
Type returns the deduced type of the AstNode.
checker/cost.go:64
↓ 61 callersFunctiontestEnv
(t testing.TB, opts ...EnvOption)
cel/cel_test.go:3982
↓ 59 callersMethodReportError
ReportError records an error at a source location.
common/errors.go:45
↓ 56 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
↓ 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 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
↓ 54 callersMethodRecover
(recognizer antlr.Parser, e antlr.RecognitionException)
parser/parser.go:287
↓ 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
↓ 50 callersMethodName
Name returns the name of the field.
common/ast/expr.go:254
↓ 50 callersMethodParse
()
repl/parser/commands_parser.go:534
↓ 49 callersMethodExpr
Expr returns the expression of the AstNode.
checker/cost.go:67
↓ 48 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:456
↓ 48 callersMethodMatch
Match returns true if the pattern matches the current value.
common/types/traits/matcher.go:22
↓ 47 callersMethodID
ID where the qualifier appears within an expression.
interpreter/attributes.go:69
↓ 45 callersMethodArgs
Args returns the list of call arguments, excluding the target.
common/ast/expr.go:173
↓ 45 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
↓ 45 callersMethodGet
(i int)
common/runes/buffer.go:26
↓ 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:363
↓ 42 callersMethodLen
()
common/runes/buffer.go:28
↓ 42 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:36
↓ 41 callersMethodFunctionName
FunctionName returns the name of the function.
common/ast/expr.go:164
↓ 41 callersMethodReportErrorAtID
ReportErrorAtID logs an error during parsing which is included in the issue set returned from a failed parse.
policy/parser.go:423
↓ 41 callersFunctionWrapErr
WrapErr wraps an existing Go error value into a CEL Err value.
common/types/err.go:115
↓ 40 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
↓ 39 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
↓ 39 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
↓ 38 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
↓ 38 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:491
↓ 38 callersMethodNewLiteral
NewLiteral creates an Expr value representing a literal value, such as a string or integer.
common/ast/factory.go:50
↓ 38 callersFunctionNewTypeParamType
NewTypeParamType creates a parameterized type instance.
common/types/types.go:584
↓ 38 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:547
↓ 38 callersMethodSize
Size returns the number of entries in the map.
common/ast/expr.go:218
↓ 37 callersFunctionEvalOptions
EvalOptions sets one or more evaluation options which may affect the evaluation or Result.
cel/options.go:720
↓ 37 callersMethodLA
LA implements (antlr.CharStream).LA.
parser/input.go:38
↓ 37 callersMethodName
Name returns the name of the validator. Names must be unique.
cel/validator.go:102
↓ 37 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
↓ 37 callersFunctionProtoTypeDefs
ProtoTypeDefs creates a RegistryOption which registers the individual proto messages with the registry.
common/types/provider.go:114
↓ 35 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
↓ 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 callersFunctionNewExprFactory
NewExprFactory creates an ExprFactory instance.
common/ast/factory.go:89
↓ 35 callersFunctionNewListType
NewListType creates an instances of a list type value with the provided element type.
common/types/types.go:480
↓ 35 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:333
↓ 35 callersFunctionnewTestRegistry
(t testing.TB, opts ...types.RegistryOption)
interpreter/interpreter_test.go:2387
↓ 34 callersMethodEnterRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1088
↓ 34 callersMethodExitRule
(listener antlr.ParseTreeListener)
repl/parser/commands_parser.go:1094
↓ 34 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
↓ 34 callersMethodProtoReflect
()
test/proto2pb/test_all_types.pb.go:763
↓ 33 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:397
↓ 33 callersMethodExec
Exec evaluates the expression within the given ExecutionFrame.
interpreter/interpretable.go:46
↓ 32 callersFunctionAsFrame
AsFrame promotes an Activation to an ExecutionFrame.
interpreter/interpretable.go:199
↓ 32 callersMethodConvertToType
ConvertToType supports type conversions between CEL value types supported by the expression language.
common/types/ref/reference.go:52
↓ 32 callersMethodIsMemberFunction
IsMemberFunction returns whether the call has a non-nil target indicating it is a member function
common/ast/expr.go:167
↓ 31 callersMethodElements
Elements returns the list elements as navigable expressions.
common/ast/expr.go:182
↓ 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 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 callersMethodNativeRep
NativeRep converts the AST to a Go-native representation.
cel/env.go:54
↓ 30 callersMethodNewIdent
NewIdent creates an Expr value representing an identifier.
common/ast/factory.go:40
↓ 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 callersFunctionEmptyActivation
EmptyActivation returns a variable-free activation.
interpreter/activation.go:38
↓ 29 callersMethodGetErrors
GetErrors returns the list of observed errors.
common/errors.go:69
↓ 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 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
↓ 28 callersMethodNewCall
NewCall creates an Expr value representing a global function call.
common/ast/factory.go:28
↓ 28 callersMethodType
Type returns the TypeValue of the value.
common/types/ref/reference.go:58
↓ 27 callersFunctionNewConstValue
NewConstValue creates a new constant valued Interpretable.
interpreter/interpretable.go:299
↓ 27 callersFunctionNewObjectType
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 callersMethodSize
Size returns the number of elements or length of the value.
common/types/traits/sizer.go:24
↓ 26 callersMethodAsMap
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 callersFunctionContainer
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 callersMethodHasNext
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