MCPcopy Create free account

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

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

↓ 4 callersMethodNewStruct
NewStruct creates a struct literal expression with an optional set of field initializers.
parser/macro.go:215
↓ 4 callersMethodNewStructField
NewStructField creates a new struct field initializer from the field name and value.
parser/macro.go:218
↓ 4 callersFunctionNewTextSourceWithLimit
NewTextSourceWithLimit creates a new Source from the input text string while enforcing a maximum code point count when needed.
common/source.go:79
↓ 4 callersMethodObserveExec
ObserveExec evaluates an interpretable and performs per-evaluation state-tracking. This method is concurrency safe and the expectation is that the ob
interpreter/interpretable.go:179
↓ 4 callersMethodOperandTrait
OperandTrait returns the trait mask of the first operand to the overload call, e.g. `traits.Indexer`
common/decls/decls.go:685
↓ 4 callersMethodOutput
Output returns the output expression, or empty expression if output is not set.
policy/parser.go:328
↓ 4 callersMethodOutput
Output returns the compiled output expression associated with the match block, if set.
policy/compiler.go:145
↓ 4 callersMethodOutputType
OutputType returns the output type of the first match clause as all match clauses are validated for agreement prior to construction fo the CompiledRul
policy/compiler.go:61
↓ 4 callersFunctionOverloadIsNonStrict
OverloadIsNonStrict enables the function to be called with error and unknown argument values. Note: do not use this option unless absoluately necessa
common/decls/decls.go:915
↓ 4 callersFunctionOverloadOperandTrait
OverloadOperandTrait configures a set of traits which the first argument to the overload must implement in order to be successfully invoked.
common/decls/decls.go:924
↓ 4 callersFunctionParse
Parse parses a repl command line into a command object. This provides the normalized command name plus any parsed parameters (e.g. variable names in l
repl/commands.go:181
↓ 4 callersFunctionParseDescription
ParseDescription takes a single string containing newline characters and splits it into a multiline description. All empty lines will be skipped. Ret
common/doc.go:76
↓ 4 callersMethodProcess
Process processes the command provided.
repl/evaluator.go:1356
↓ 4 callersFunctionProtoAsType
ProtoAsType converts a canonical CEL celpb.Type protobuf type to a CEL-native type representation.
common/types/types.go:692
↓ 4 callersMethodProtoKind
ProtoKind returns the protobuf reflected kind of the field.
common/types/pb/type.go:373
↓ 4 callersFunctionProtoToSourceInfo
ProtoToSourceInfo deserializes the protobuf into a native SourceInfo value.
common/ast/conversion.go:573
↓ 4 callersMethodPush
Push creates a new Scopes value which references the current Scope as its parent.
checker/scopes.go:54
↓ 4 callersMethodQualInt
QualInt adds an int qualifier pattern to the AttributePattern. The index may be either a map or list index.
interpreter/attribute_patterns.go:71
↓ 4 callersMethodQualify
Qualify replicates the Attribute.Qualify method to permit extension and interception of object qualification.
interpreter/interpretable.go:101
↓ 4 callersMethodReceive
Receive implements traits.Receiver.Receive.
common/types/duration.go:157
↓ 4 callersFunctionRegex
Regex returns a cel.EnvOption to configure extended functions for regular expression operations. Note: all functions use the 'regex' namespace. If yo
ext/regex.go:104
↓ 4 callersMethodRegisterDescriptor
RegisterDescriptor produces a `FileDescription` from a `FileDescriptor` and registers the message and enum types into the `pb.Db`.
common/types/pb/pb.go:168
↓ 4 callersMethodResolve
Resolve returns the value of the Attribute given the current Activation.
interpreter/interpretable.go:112
↓ 4 callersMethodRule
Rule returns the rule value, or nil if the rule is not set.
policy/parser.go:354
↓ 4 callersMethodSetMacroCall
SetMacroCall records a macro call at a specific location.
common/ast/ast.go:327
↓ 4 callersMethodSetMetadata
SetMetadata updates a named metadata key with the given value.
policy/parser.go:125
↓ 4 callersFunctionSets
Sets returns a cel.EnvOption to configure namespaced set relationship functions. There is no set type within CEL, and while one may be introduced in
ext/sets.go:78
↓ 4 callersFunctionSingletonBinaryBinding
SingletonBinaryBinding creates a singleton function definition to be used with all function overloads. Note, this approach works well if operand is e
cel/decls.go:269
↓ 4 callersMethodSource
Source returns the policy file contents as a CEL source object.
policy/parser.go:60
↓ 4 callersMethodSourceID
SourceID returns the expression id associated with the output expression.
policy/compiler.go:172
↓ 4 callersFunctionSourceInfoToProto
SourceInfoToProto serializes an ast.SourceInfo value to a protobuf SourceInfo object.
common/ast/conversion.go:529
↓ 4 callersMethodSubset
Subset returns a new function declaration which contains only the overloads with the specified IDs. If the subset function contains no overloads, then
common/decls/decls.go:228
↓ 4 callersFunctionToAST
ToAST converts a CheckedExpr protobuf to an AST instance.
common/ast/conversion.go:78
↓ 4 callersFunctionToProto
ToProto converts an AST to a CheckedExpr protobouf.
common/ast/conversion.go:44
↓ 4 callersMethodTypeAdapter
TypeAdapter returns the `ref.TypeAdapter` configured for the environment. Deprecated: use CELTypeAdapter()
cel/env.go:719
↓ 4 callersMethodUnary
Getter signatures
repl/parser/commands_parser.go:5410
↓ 4 callersFunctionUnparseType
UnparseType pretty-prints a type for the REPL.
repl/typefmt.go:41
↓ 4 callersFunctionValToConstant
ValToConstant converts a CEL-native ref.Val to a protobuf Constant. Only simple scalar types are supported by this method.
common/ast/conversion.go:640
↓ 4 callersFunctionVariableDecls
VariableDecls configures a set of fully defined cel.VariableDecl instances in the environment.
cel/decls.go:157
↓ 4 callersMethodVersionNumber
VersionNumber returns the parsed version string, or an error if the version cannot be parsed.
common/env/env.go:500
↓ 4 callersMethodVisit
(tree antlr.ParseTree)
repl/typefmt.go:65
↓ 4 callersFunctionWrapOnColumn
WrapOnColumn wraps the output expression when its string length exceeds a specified limit for operators set by WrapOnOperators function or by default,
parser/unparser.go:606
↓ 4 callersMethodZero
Zero returns an empty immutable protobuf message when the description is a protobuf message type.
common/types/pb/type.go:38
↓ 4 callersFunctionadaptToV2
adaptToV2 adapts a V1 Interpretable implementation to the V2 interface. This adapter is used to bridge the legacy Interpretable interface to the mode
interpreter/interpretable.go:54
↓ 4 callersFunctionaddInt64Checked
addInt64Checked performs addition with overflow detection of two int64 values. If the operation fails the error return value will be non-nil.
common/types/overflow.go:29
↓ 4 callersMethodapplyContext
applyContext evaluates the let expressions in the context to build an activation for the given expression. returns the environment for compiling and p
repl/evaluator.go:1010
↓ 4 callersFunctionconvertProto
(src, dst proto.Message)
cel/io.go:342
↓ 4 callersFunctiondoubleToInt64Lossless
(v float64)
common/types/overflow.go:410
↓ 4 callersMethodeval
(expr string)
tools/celtest/test_runner.go:857
↓ 4 callersFunctionexpectNativeToValue
(t *testing.T, in any, out ref.Val)
common/types/provider_test.go:857
↓ 4 callersFunctionformatTo
(sb *strings.Builder, val ref.Val)
common/types/format.go:23
↓ 4 callersFunctiongetElem
(t *testing.T, list traits.Indexer, index ref.Val)
common/types/list_test.go:867
↓ 4 callersFunctionisNumericArgType
(arg ast.Expr)
ext/math.go:906
↓ 4 callersMethodlocationByID
(id int64)
checker/checker.go:714
↓ 4 callersFunctionmaybeUnwrapOptional
(t *types.Type)
checker/types.go:49
↓ 4 callersFunctionnewIdent
(name string, t *exprpb.Type, v *exprpb.Constant, desc string)
checker/decls/decls.go:115
↓ 4 callersFunctionnodeAsUintValue
(node checker.AstNode, defaultVal uint64)
ext/costs.go:69
↓ 4 callersFunctionoptimizerEnv
(t *testing.T)
cel/optimizer_test.go:323
↓ 4 callersFunctionparseCIDR
(raw string)
ext/network.go:453
↓ 4 callersMethodpeekLocalVar
(varName string)
checker/cost.go:456
↓ 4 callersMethodpush
(varName string, expr ast.Expr, path []string, size *SizeEstimate, entrySize *entrySizeEstimate)
checker/cost.go:380
↓ 4 callersFunctionsetLimit
(id limitID, limit int)
cel/options.go:925
↓ 4 callersMethodsizeOrUnknown
(node any)
checker/cost.go:924
↓ 4 callersFunctiontestProtosEnv
testProtosEnv initializes the test environment common to all tests.
ext/protos_test.go:213
↓ 4 callersFunctiontestRegexEnv
(t *testing.T, opts ...cel.EnvOption)
ext/regex_test.go:264
↓ 4 callersFunctiontoFieldName
(fieldNameHandler NativeTypesFieldNameHandler, f reflect.StructField)
ext/native.go:275
↓ 4 callersFunctionuint64ToInt64Lossless
(v uint64)
common/types/overflow.go:426
↓ 4 callersFunctionvisit
TODO: consider exposing a way to configure a limit for the max visit depth. It's possible that we could want to configure this on the NewExprVisitor()
common/ast/navigable.go:194
↓ 3 callersMethodAccuIdentName
AccuIdentName reports the name of the accumulator variable to be used within a comprehension.
common/ast/factory.go:47
↓ 3 callersMethodAdapter
Adapter returns the type adapter to be used for adapting resolved Attribute values.
interpreter/interpretable.go:89
↓ 3 callersMethodAddLimits
AddLimits appends one or more limits to the config.
common/env/env.go:216
↓ 3 callersMethodAddOverload
AddOverload appends a function overload ID to the ReferenceInfo.
common/ast/ast.go:489
↓ 3 callersMethodAddOverload
AddOverload ensures that the new overload does not collide with an existing overload signature; however, if the function signatures are identical, the
common/decls/decls.go:259
↓ 3 callersMethodAddQualifier
AddQualifier proxies the Attribute.AddQualifier method. Note, this method may mutate the current attribute state. If the desire is to clone the Attri
interpreter/interpretable.go:97
↓ 3 callersFunctionAlias
Alias associates a name with a user-defined alias. In general, Abbrevs is preferred to Alias since the names generated from the Abbrevs option are mo
common/containers/container.go:245
↓ 3 callersFunctionAllMatcher
AllMatcher returns true for all descendants of a NavigableExpr, effectively flattening them into a list. Such a result would work well with subsequen
common/ast/navigable.go:98
↓ 3 callersFunctionAuthoringPrompt
AuthoringPrompt creates a prompt template from a CEL environment for the purpose of AI-assisted authoring.
cel/prompt.go:64
↓ 3 callersMethodCheckInterrupt
CheckInterrupt returns whether the evaluation has been interrupted.
interpreter/frame.go:181
↓ 3 callersMethodClone
Clone makes a shallow copy of the tracker. The different clones can be used independently from each other.
interpreter/runtimecost.go:239
↓ 3 callersFunctionCollectFileDescriptorSet
CollectFileDescriptorSet builds a file descriptor set associated with the file where the input message is declared.
common/types/pb/pb.go:245
↓ 3 callersFunctionCompile
Compile combines the policy compilation and composition steps into a single call. This generates a single CEL AST from a collection of policy express
policy/compiler.go:244
↓ 3 callersMethodCondition
Condition returns the condition CEL expression.
policy/parser.go:318
↓ 3 callersMethodConfigValue
ConfigValue retrieves the value associated with the config key name, if one exists.
common/env/env.go:724
↓ 3 callersFunctionCost
Cost estimates the cost of the parsed and type checked CEL expression.
checker/cost.go:285
↓ 3 callersFunctionCustomDecoratorV2
CustomDecoratorV2 appends an InterpreterDecoratorV2 to the program.
cel/options.go:460
↓ 3 callersMethodDelLetFn
DelLetFn removes a function from the evaluation context. If deleting the function breaks a later expression, this function will return an error withou
repl/evaluator.go:718
↓ 3 callersMethodDescriptor
()
test/proto2pb/test_all_types.pb.go:63
↓ 3 callersFunctionDisableDeclaration
DisableDeclaration disables the function signatures, effectively removing them from the type-check environment while preserving the runtime bindings.
cel/decls.go:293
↓ 3 callersFunctionEnableIdentEscapeSyntax
EnableIdentEscapeSyntax enables backtick (`) escaped field identifiers. This supports extended types of characters in identifiers, e.g. foo.`baz-bar`.
parser/options.go:134
↓ 3 callersFunctionEqual
Equal returns whether two proto.Message instances are equal using the following criteria: - Messages must share the same instance of the type descrip
common/types/pb/equal.go:45
↓ 3 callersFunctionErrorAsIssues
ErrorAsIssues wraps a Golang error into a CEL common error and issue set. This is a convenience method for early returning from an expression validat
cel/env.go:972
↓ 3 callersMethodExamples
Examples returns a list of string examples for the overload.
common/decls/decls.go:628
↓ 3 callersFunctionExcludeOverloads
ExcludeOverloads defines an OverloadSelector which deny-lists a set of overloads by their ids.
common/decls/decls.go:214
↓ 3 callersMethodExecuteTest
ExecuteTest executes the test case against the provided list of programs and returns an error if the test fails. During the test execution, the interm
tools/celtest/test_runner.go:1021
↓ 3 callersFunctionExprDeclToDeclaration
ExprDeclToDeclaration converts a protobuf CEL declaration to a CEL-native declaration, either a Variable or Function.
cel/decls.go:373
↓ 3 callersFunctionExprToString
ExprToString converts an AST Expr node back to a string using macro call tracking metadata from source info if any macros are encountered within the e
cel/io.go:107
↓ 3 callersFunctionExpressionSizeCodePointLimit
ExpressionSizeCodePointLimit is an option which limits the maximum code point count of an expression.
parser/options.go:90
↓ 3 callersFunctionExpressionUnnestHeight
ExpressionUnnestHeight determines the height at which nested expressions are split into local variables within the cel.@block declaration.
policy/composer.go:35
↓ 3 callersFunctionFileDescriptorSet
FileDescriptorSet creates a Test Runner Option which adds a file descriptor set to the test runner. The file descriptor set is used to register proto
tools/celtest/test_runner.go:473
↓ 3 callersMethodFindIdentInScope
FindIdentInScope finds the first ident Decl with a matching name in the current Scopes value, or nil if one does not exist. Note: The search is only p
checker/scopes.go:94
← previousnext →701–800 of 7,240, ranked by callers