Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cel-expr/cel-go
/ functions
Functions
7,844 in github.com/cel-expr/cel-go
⨍
Functions
7,844
◇
Types & classes
931
↓ 5 callers
Function
newAsyncGate
(maxConcurrency int, completions chan<- int64)
interpreter/async.go:464
↓ 5 callers
Function
newSharedRegistryPair
(t *testing.T, opts ...RegistryOption)
common/types/provider_test.go:88
↓ 5 callers
Function
nodeAsUintValue
nodeAsUintValue returns the value of a literal int node as a uint64, or the default value if the node is not a non-negative int literal.
ext/costs.go:71
↓ 5 callers
Function
parseIPAddr
(raw string)
ext/network.go:520
↓ 5 callers
Function
refQualify
refQualify attempts to convert the value to a CEL value and then uses reflection methods to try and apply the qualifier with the option to presence te
interpreter/attributes.go:1368
↓ 5 callers
Method
removeIndent
()
common/debug/debug.go:305
↓ 5 callers
Function
sanitizeProtoName
sanitizeProtoName strips the leading '.' from the proto message name.
common/types/pb/file.go:126
↓ 5 callers
Method
setEntrySize
(e ast.Expr, size *entrySizeEstimate)
checker/cost.go:940
↓ 5 callers
Method
setReference
(e ast.Expr, r *ast.ReferenceInfo)
checker/checker.go:684
↓ 5 callers
Function
testContainer
(name string)
interpreter/interpreter_test.go:2485
↓ 5 callers
Function
testMathEnv
(t *testing.T, opts ...cel.EnvOption)
ext/math_test.go:662
↓ 5 callers
Function
toParserHelper
(meh MacroExprHelper)
cel/macro.go:582
↓ 5 callers
Function
visit
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:217
↓ 4 callers
Method
AddExtension
AddExtension adds an extension record into the SourceInfo.
common/ast/ast.go:461
↓ 4 callers
Method
AddFunctions
AddFunctions adds one or more functions to the config.
common/env/env.go:180
↓ 4 callers
Method
ArgCount
ArgCount for the function call. When the macro is a var-arg style macro, the return value will be zero, but the MacroKey will contain a `*` where the
parser/macro.go:109
↓ 4 callers
Method
CallID
CallID returns the unique identifier for this async call invocation.
interpreter/async.go:58
↓ 4 callers
Method
CandidateVariableNames
CandidateVariableNames returns the possible namespaced variable names for this Attribute in the CEL namespace resolution order.
interpreter/attributes.go:123
↓ 4 callers
Method
ClearMacroCall
ClearMacroCall clears the macro at the given expression id.
cel/optimizer.go:305
↓ 4 callers
Function
Compile
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:258
↓ 4 callers
Function
CompileRegexConstants
CompileRegexConstants compiles regex pattern string constants at program creation time and reports any regex pattern compile errors.
interpreter/interpreter.go:225
↓ 4 callers
Function
CompileRule
CompileRule creates a compiled rules from the policy which contains a set of compiled variables and match statements. The compiled rule defines an exp
policy/compiler.go:271
↓ 4 callers
Method
CompileSource
CompileSource combines the Parse and Check phases CEL program compilation to produce an Ast and associated issues. If an error is encountered during
cel/env.go:515
↓ 4 callers
Method
ComputedSize
ComputedSize returns a size estimate of the AstNode derived from information available in the CEL expression. For constants and inline list and map de
checker/cost.go:74
↓ 4 callers
Method
ConfigValue
ConfigValue retrieves the value associated with the config key name, if one exists.
common/env/env.go:724
↓ 4 callers
Function
ConstantToVal
ConstantToVal converts a protobuf Constant to a CEL-native ref.Val.
common/ast/conversion.go:664
↓ 4 callers
Function
Copy
Copy creates a deep copy of the Expr and SourceInfo values in the input AST. Copies of the Expr value are generated using an internal default ExprFac
common/ast/ast.go:133
↓ 4 callers
Function
CustomDecoratorV2
CustomDecoratorV2 appends an InterpreterDecoratorV2 to the program.
cel/options.go:475
↓ 4 callers
Method
DeclaredTypeName
DeclaredTypeName indicates the fully qualified and parameterized type-check type name.
common/types/types.go:351
↓ 4 callers
Method
DescribeEnum
DescribeEnum takes a qualified enum name and returns an `EnumDescription` if it exists in the `pb.Db`.
common/types/pb/pb.go:226
↓ 4 callers
Function
DiffMessage
DiffMessage creates a diff dump message for test failures.
test/compare.go:29
↓ 4 callers
Function
DisableDeclaration
DisableDeclaration disables the function signatures, effectively removing them from the type-check environment while preserving the runtime bindings.
cel/decls.go:297
↓ 4 callers
Function
DisableDeclaration
DisableDeclaration indicates that the function declaration should be disabled, but the runtime function binding should be provided. Marking a function
common/decls/decls.go:482
↓ 4 callers
Function
DisableTypeGuards
DisableTypeGuards disables automatically generated function invocation guards on direct overload calls. Type guards remain on during dynamic dispatch
common/decls/decls.go:472
↓ 4 callers
Method
Divide
Divide returns the result of dividing the current value by the input denominator. A denominator value of zero results in an error.
common/types/traits/math.go:33
↓ 4 callers
Function
EnableIdentEscapeSyntax
EnableIdentEscapeSyntax enables backtick (`) escaped field identifiers. This supports extended types of characters in identifiers, e.g. foo.`baz-bar`.
parser/options.go:147
↓ 4 callers
Function
EnableVariadicOperatorASTs
EnableVariadicOperatorASTs enables a compact representation of chained like-kind commutative operators. e.g. `a || b || c || d` -> `call(op='||', args
parser/options.go:171
↓ 4 callers
Function
EncodersVersion
EncodersVersion sets the library version for encoder extensions.
ext/encoders.go:82
↓ 4 callers
Function
EntryExprToProto
EntryExprToProto converts an ast.EntryExpr to a protobuf CreateStruct entry
common/ast/conversion.go:315
↓ 4 callers
Function
Equal
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
↓ 4 callers
Function
ExceedsDepth
ExceedsDepth determines whether the AST contains expressions nested deeper than the specified maxDepth. The root expression has depth 0, so a maxDepth
common/ast/navigable.go:191
↓ 4 callers
Method
FindStructFieldDescription
FindStructFieldDescription returns documentation for a field if available. Returns false if the field could not be found.
cel/fieldpaths.go:28
↓ 4 callers
Method
Fold
Fold calls the FoldEntry method for each (key, value) pair in the map.
common/types/map.go:130
↓ 4 callers
Function
FoldKnownValues
FoldKnownValues adds an Activation which provides known values for the folding evaluator Any values the activation provides will be used by the const
cel/folding.go:49
↓ 4 callers
Function
FormatCheckedType
FormatCheckedType converts a type message into a string representation.
checker/format.go:45
↓ 4 callers
Function
FromConfig
FromConfig configures a CEL policy environment from a config file. This option supports all extensions supported by policies, whereas the cel.FromCon
policy/config.go:28
↓ 4 callers
Function
FunctionDecls
FunctionDecls provides one or more fully formed function declarations to be added to the environment.
cel/decls.go:221
↓ 4 callers
Function
FunctionMatcher
FunctionMatcher returns an ExprMatcher which will match NavigableExpr nodes of CallKind type whose function name is equal to `funcName`.
common/ast/navigable.go:86
↓ 4 callers
Method
GetEntries
()
parser/gen/cel_parser.go:2998
↓ 4 callers
Method
GetLeadingDot
GetLeadingDot returns the leadingDot token.
repl/parser/commands_parser.go:3079
↓ 4 callers
Method
GetParams
GetParams returns the params rule contexts.
repl/parser/commands_parser.go:3447
↓ 4 callers
Method
GetType
GetType returns the variable type description. Note, if both the embedded TypeDesc and the field Type are non-nil, the embedded TypeDesc will take pr
common/env/env.go:291
↓ 4 callers
Method
GetTypeDescription
GetTypeDescription returns a TypeDescription for a qualified protobuf message type name declared within the .proto file.
common/types/pb/file.go:109
↓ 4 callers
Method
GetTypeNames
GetTypeNames returns the list of all type names contained within the file.
common/types/pb/file.go:115
↓ 4 callers
Method
HasOutput
HasOutput indicates whether the output field is set of the match.
policy/parser.go:365
↓ 4 callers
Function
InitEmptyMemberContext
(p *MemberContext)
parser/gen/cel_parser.go:2145
↓ 4 callers
Function
InitEmptyMemberContext
(p *MemberContext)
repl/parser/commands_parser.go:6103
↓ 4 callers
Function
InsertMapKeyValue
InsertMapKeyValue inserts a key, value pair into the target map if the target map does not already contain the given key. If the map is mutable, it i
common/types/map.go:1057
↓ 4 callers
Function
IsBool
IsBool returns whether the input ref.Val or ref.Type is equal to BoolType.
common/types/bool.go:141
↓ 4 callers
Method
IsDeclarationDisabled
IsDeclarationDisabled indicates that the function implementation should be added to the dispatcher, but the declaration should not be exposed for use
common/decls/decls.go:134
↓ 4 callers
Method
IsMessage
IsMessage returns true if the field is of message type.
common/types/pb/type.go:331
↓ 4 callers
Method
IsReceiverStyle
IsReceiverStyle returns true if the macro matches a receiver style call.
parser/macro.go:112
↓ 4 callers
Function
ListsVersion
ListsVersion configures the version of the string library. The version limits which functions are available. Only functions introduced below or equal
ext/lists.go:188
↓ 4 callers
Function
MacroDocs
MacroDocs configures a list of strings into a multiline description for the macro.
parser/macro.go:31
↓ 4 callers
Function
MacroExamples
MacroExamples configures a list of examples, either as a string or common.MultilineString, into an example set to be provided with the macro Documenta
parser/macro.go:40
↓ 4 callers
Method
MacroKey
MacroKey returns the macro signatures accepted by this macro. Format: `<function>:<arg-count>:<is-receiver>`. When the macros is a var-arg style mac
parser/macro.go:119
↓ 4 callers
Method
Matches
Matches returns the ordered set of Match declarations.
policy/parser.go:252
↓ 4 callers
Function
Merge
Merge will copy the source proto message into the destination, or error if the merge cannot be completed. Unlike the proto.Merge, this method will fa
common/types/pb/pb.go:66
↓ 4 callers
Method
NestedRule
NestedRule returns the nested rule, if set.
policy/compiler.go:164
↓ 4 callers
Function
Network
Network returns a cel.EnvOption to configure extended functions for network address parsing, inspection, and CIDR range manipulation. Note: This libr
ext/network.go:134
↓ 4 callers
Function
NewCompiler
NewCompiler creates a new compiler with a set of functional options.
tools/compiler/compiler.go:120
↓ 4 callers
Method
NewComprehensionTwoVar
NewComprehensionTwoVar creates an Expr value representing a two-variable comprehension over a value range.
common/ast/factory.go:34
↓ 4 callers
Function
NewExtension
NewExtension creates an Extension to be recorded on the SourceInfo.
common/ast/ast.go:538
↓ 4 callers
Function
NewInlineVariable
NewInlineVariable declares a variable name to be replaced by a checked expression.
cel/inlining.go:55
↓ 4 callers
Function
NewInliningOptimizer
NewInliningOptimizer creates and optimizer which replaces variables with expression definitions. If a variable occurs one time, the variable is repla
cel/inlining.go:70
↓ 4 callers
Function
NewIssues
NewIssues returns an Issues struct from a common.Errors object.
cel/env.go:1069
↓ 4 callers
Function
NewMutableMap
NewMutableMap constructs a mutable map from an adapter and a set of map values.
common/types/map.go:100
↓ 4 callers
Function
NewReceiverMacro
NewReceiverMacro creates a Macro for a receiver function matching the specified arg count.
parser/macro.go:60
↓ 4 callers
Function
NewReceiverVarArgMacro
NewReceiverVarArgMacro creates a Macro for a receiver function matching a variable arg count.
parser/macro.go:85
↓ 4 callers
Function
NewRuleComposer
NewRuleComposer creates a rule composer which stitches together rules within a policy into a single CEL expression.
policy/composer.go:47
↓ 4 callers
Function
NewStringInterfaceMap
NewStringInterfaceMap returns a specialized traits.Mapper with string keys and interface values.
common/types/map.go:72
↓ 4 callers
Method
NewStructField
NewStructField creates a new struct field initializer from the field name and value.
parser/macro.go:218
↓ 4 callers
Function
NewTextSourceWithLimit
NewTextSourceWithLimit creates a new Source from the input text string while enforcing a maximum code point count when needed.
common/source.go:79
↓ 4 callers
Method
NextAction
NextAction evaluates the current state of asynchronous evaluation and determines the next step. - completed: The set of completions accumulated in th
cel/async/async.go:65
↓ 4 callers
Method
OperandTrait
OperandTrait returns the trait mask of the first operand to the overload call, e.g. `traits.Indexer`
common/decls/decls.go:729
↓ 4 callers
Method
Output
Output returns the output expression, or empty expression if output is not set.
policy/parser.go:370
↓ 4 callers
Method
Output
Output returns the compiled output expression associated with the match block, if set.
policy/compiler.go:159
↓ 4 callers
Method
OutputType
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:67
↓ 4 callers
Function
OverloadIsNonStrict
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:1011
↓ 4 callers
Function
OverloadOperandTrait
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:1020
↓ 4 callers
Function
Parse
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 callers
Function
ParseDescription
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 callers
Method
Process
Process processes the command provided.
repl/evaluator.go:1356
↓ 4 callers
Function
ProtoAsType
ProtoAsType converts a canonical CEL celpb.Type protobuf type to a CEL-native type representation.
common/types/types.go:692
↓ 4 callers
Method
ProtoKind
ProtoKind returns the protobuf reflected kind of the field.
common/types/pb/type.go:373
↓ 4 callers
Function
ProtoToSourceInfo
ProtoToSourceInfo deserializes the protobuf into a native SourceInfo value.
common/ast/conversion.go:573
↓ 4 callers
Method
Push
Push creates a new Scopes value which references the current Scope as its parent.
checker/scopes.go:42
↓ 4 callers
Method
QualInt
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 callers
Method
Qualify
Qualify replicates the Attribute.Qualify method to permit extension and interception of object qualification.
interpreter/interpretable.go:101
↓ 4 callers
Method
Receive
Receive implements traits.Receiver.Receive.
common/types/duration.go:157
← previous
next →
701–800 of 7,844, ranked by callers