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
↓ 6 callers
Function
Protos
Protos returns a cel.EnvOption to configure extended macros and functions for proto manipulation. Note, all macros use the 'proto' namespace; however
ext/protos.go:54
↓ 6 callers
Method
QualifyIfPresent
QualifyIfPresent qualifies the object if the qualifier is declared or defined on the object. The 'presenceOnly' flag indicates that the value is not n
interpreter/interpretable.go:106
↓ 6 callers
Method
RecoverInline
(recognizer antlr.Parser)
parser/parser.go:293
↓ 6 callers
Method
RegisterMessage
RegisterMessage registers a protocol buffer message and its dependencies.
common/types/ref/provider.go:73
↓ 6 callers
Method
RegisterType
RegisterType registers a type value with the provider which ensures the provider is aware of how to map the type to an identifier. If a type is provi
common/types/ref/provider.go:80
↓ 6 callers
Function
SerializeTypeDesc
SerializeTypeDesc converts a CEL native *types.Type to a serializable TypeDesc.
common/env/env.go:969
↓ 6 callers
Method
SetContainer
SetContainer configures the container name for this configuration.
common/env/env.go:110
↓ 6 callers
Method
SetDisabled
SetDisabled disables or enables the library.
common/env/env.go:653
↓ 6 callers
Function
SingletonFunctionBinding
SingletonFunctionBinding creates a singleton function definition to be used with all function overloads. Note, this approach works well if operand is
common/decls/decls.go:523
↓ 6 callers
Function
SingletonUnaryBinding
SingletonUnaryBinding creates a singleton function definition to be used for all function overloads. Note, this approach works well if operand is exp
cel/decls.go:251
↓ 6 callers
Method
Source
Source returns a view of the input used to create the Ast. This source may be complete or constructed from the SourceInfo.
cel/env.go:111
↓ 6 callers
Method
Subtract
Subtract returns the result of subtracting the input from the current value.
common/types/traits/math.go:61
↓ 6 callers
Function
TestExpression
TestExpression returns a TestRunnerOption which configures a policy file, expression file, or raw expression for testing
tools/celtest/test_runner.go:436
↓ 6 callers
Function
ToAdornedDebugString
ToAdornedDebugString gives the adorned string representation of the Expr.
common/debug/debug.go:61
↓ 6 callers
Function
Unparse
Unparse takes an input expression and source position information and generates a human-readable expression. Note, unparsing an AST will often genera
parser/unparser.go:44
↓ 6 callers
Method
Unwrap
Unwrap returns the Activation which omits local state.
interpreter/interpreter.go:113
↓ 6 callers
Method
computeSize
(e ast.Expr)
checker/cost.go:943
↓ 6 callers
Function
estimateAllocatingListCall
estimateAllocatingListCall computes cost as a function of the size of the result list with a baseline cost for the call dispatch and the associated li
ext/lists.go:720
↓ 6 callers
Function
extractIterVars
(mef cel.MacroExprFactory, arg0, arg1 ast.Expr)
ext/comprehensions.go:401
↓ 6 callers
Function
file_test_proto3pb_test_all_types_proto_rawDescGZIP
()
test/proto3pb/test_all_types.pb.go:1118
↓ 6 callers
Method
getType
(e ast.Expr)
checker/cost.go:882
↓ 6 callers
Method
isAssignable
(t1, t2 *types.Type)
checker/checker.go:640
↓ 6 callers
Function
isDyn
isDyn returns true if the input t is either type DYN or a well-known ANY message.
checker/types.go:22
↓ 6 callers
Method
maybeCreateLiteral
(id int64, val ref.Val)
interpreter/prune.go:89
↓ 6 callers
Method
maybeValue
(id int64)
interpreter/prune.go:473
↓ 6 callers
Method
newLiteral
(ctx any, value ref.Val)
parser/helper.go:48
↓ 6 callers
Method
setup
(t testing.TB, env *cel.Env, ast *cel.Ast)
policy/compiler_test.go:334
↓ 6 callers
Method
skipWhitespace
()
common/env/io.go:236
↓ 6 callers
Function
testCheckCost
(t *testing.T, env *cel.Env, ast *cel.Ast, hints map[string]uint64, wantEst checker.CostEstimate)
ext/sets_test.go:488
↓ 6 callers
Function
testCompreEnv
(t *testing.T, opts ...cel.EnvOption)
ext/comprehensions_test.go:795
↓ 6 callers
Function
testMustParse
(t testing.TB, data any)
interpreter/interpreter_test.go:2352
↓ 6 callers
Method
typeMismatch
(id int64, l common.Location, expected, actual *types.Type)
checker/errors.go:73
↓ 6 callers
Method
visitMaybeNested
(expr ast.Expr, nested bool)
parser/unparser.go:458
↓ 5 callers
Function
Abbrevs
Abbrevs configures a set of simple names as abbreviations for fully-qualified names. An abbreviation (abbrev for short) is a simple name that expands
common/containers/container.go:213
↓ 5 callers
Method
AddExcludedFunctions
AddExcludedFunctions deny-lists one or more functions from the subset.
common/env/env.go:687
↓ 5 callers
Method
AliasSet
AliasSet returns the alias to fully-qualified name mapping stored in the container.
common/containers/container.go:137
↓ 5 callers
Method
Append
Append collects the issues from another Issues struct into a new Issues object.
cel/env.go:1013
↓ 5 callers
Method
AsCost
AsCost converts a size estimates to an equivalent cost estimate.
checker/cost.go:163
↓ 5 callers
Method
AsPartialActivation
AsPartialActivation converts the current activation to a PartialActivation
interpreter/activation.go:181
↓ 5 callers
Function
AstToParsedExpr
AstToParsedExpr converts an Ast to an protobuf ParsedExpr value.
cel/io.go:90
↓ 5 callers
Function
BindingsVersion
BindingsVersion sets the version of the bindings library to an explicit version.
ext/bindings.go:73
↓ 5 callers
Function
CheckedExprToAst
CheckedExprToAst converts a checked expression proto message to an Ast.
cel/io.go:37
↓ 5 callers
Method
CheckedType
CheckedType returns the type-definition used at type-check time.
common/types/pb/type.go:222
↓ 5 callers
Method
ComputeOffset
ComputeOffset calculates the 0-based character offset from a 1-based line and 0-based column.
common/ast/ast.go:411
↓ 5 callers
Function
ConstantValueMatcher
ConstantValueMatcher returns an ExprMatcher which will return true if the input NavigableExpr is comprised of all constant values, such as a simple li
common/ast/navigable.go:72
↓ 5 callers
Function
CustomDecoratorV2
CustomDecoratorV2 configures a custom V2 interpretable decorator for the program.
interpreter/interpreter.go:165
↓ 5 callers
Function
CustomTypeAdapter
CustomTypeAdapter swaps the default types.Adapter implementation with a custom one. Note: This option must be specified before the Types and TypeDesc
cel/options.go:151
↓ 5 callers
Function
CustomTypeProvider
CustomTypeProvider replaces the types.Provider implementation with a custom one. The `provider` variable type may either be types.Provider or ref.Typ
cel/options.go:163
↓ 5 callers
Method
DeclarationIsEquivalent
DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input.
common/decls/decls.go:998
↓ 5 callers
Function
DeclareContextProto
DeclareContextProto returns an option to extend CEL environment with declarations from the given context proto. Each field of the proto defines a vari
cel/options.go:828
↓ 5 callers
Function
EnableIdentifierEscapeSyntax
EnableIdentifierEscapeSyntax enables identifier escaping (`) syntax for fields.
cel/options.go:902
↓ 5 callers
Function
Encoders
Encoders returns a cel.EnvOption to configure extended functions for string, byte, and object encodings. # Base64.Decode Decodes base64-encoded stri
ext/encoders.go:66
↓ 5 callers
Method
EnumValue
EnumValue returns the numeric value of the given enum value name.
common/types/provider.go:43
↓ 5 callers
Method
Equals
Equals returns whether two references are identical to each other.
common/ast/ast.go:499
↓ 5 callers
Function
ErrorRecoveryLookaheadTokenLimit
ErrorRecoveryLookaheadTokenLimit limits the number of lexer tokens that may be considered during error recovery. Error recovery often involves lookin
parser/options.go:54
↓ 5 callers
Method
Errors
Errors returns the collection of errors encountered in more granular detail.
cel/env.go:1005
↓ 5 callers
Function
EvalStateFactory
EvalStateFactory configures the EvalState generator to be used by the EvalStateObserver.
interpreter/interpreter.go:85
↓ 5 callers
Function
ExhaustiveEval
ExhaustiveEval replaces operations that short-circuit with versions that evaluate expressions and couples this behavior with the TrackState() decorato
interpreter/interpreter.go:177
↓ 5 callers
Method
Extend
Extend creates a new Container with the existing settings and applies a series of ContainerOptions to further configure the new container.
common/containers/container.go:60
↓ 5 callers
Function
ExtendedValidations
ExtendedValidations collects a set of common AST validations which reduce the likelihood of runtime errors. - Validate duration and timestamp literal
cel/validator.go:190
↓ 5 callers
Function
ExtensionOptionFactory
ExtensionOptionFactory converts an ExtensionConfig value to a CEL environment option.
ext/extension_option_factory.go:25
↓ 5 callers
Method
FieldMap
FieldMap returns a string field name to FieldDescription map.
common/types/pb/type.go:101
↓ 5 callers
Method
FindFieldType
FieldFieldType returns the field type for a checked type value. Returns false if the field could not be found.
common/types/ref/provider.go:40
↓ 5 callers
Method
FindType
FindType looks up the Type given a qualified typeName. Returns false if not found.
common/types/ref/provider.go:36
↓ 5 callers
Method
Functions
Functions returns a shallow copy of the Functions, keyed by function name, that have been configured in the environment.
cel/env.go:624
↓ 5 callers
Method
GetArgs
GetArgs returns the args token list.
repl/parser/commands_parser.go:2268
↓ 5 callers
Method
GetOps
GetOps returns the ops token list.
repl/parser/commands_parser.go:4642
↓ 5 callers
Method
GetOpt
GetOpt returns the opt token.
repl/parser/commands_parser.go:9276
↓ 5 callers
Method
GetOrDefault
(name string, value any)
cel/validator.go:129
↓ 5 callers
Method
GetTok
()
parser/gen/cel_parser.go:5901
↓ 5 callers
Method
HasFeature
HasFeature checks whether the environment enables the given feature flag, as enumerated in options.go.
cel/env.go:597
↓ 5 callers
Method
HasLibrary
HasLibrary returns whether a specific SingletonLibrary has been configured in the environment.
cel/env.go:603
↓ 5 callers
Method
IsAssignableRuntimeType
IsAssignableRuntimeType determines whether the current type is runtime assignable from the input runtimeType. At runtime, parameterized types are era
common/types/types.go:328
↓ 5 callers
Method
IsNonStrict
IsNonStrict returns whether the overload accepts errors and unknown values as arguments.
common/decls/decls.go:668
↓ 5 callers
Function
JSONFieldNames
JSONFieldNames supports accessing protocol buffer fields by json-name. Enabling JSON field name support will create a copy of the types.Registry with
cel/options.go:442
↓ 5 callers
Function
K8sTestTagHandler
K8sTestTagHandler returns a TagVisitor which handles custom policy tags used in K8s policies. This is a helper function to be used in tests.
policy/test_tag_handler_k8s.go:23
↓ 5 callers
Method
LineOffsets
LineOffsets gives the character offsets at which lines occur. The zero-th entry should refer to the break between the first and second line, or EOF if
common/source.go:37
↓ 5 callers
Function
MatchSubset
MatchSubset applies an ExprMatcher to a list of NavigableExpr values and their descendants, producing a subset of NavigableExpr values which match.
common/ast/navigable.go:122
↓ 5 callers
Method
Matches
Matches returns the list of matches associated with the rule.
policy/compiler.go:55
↓ 5 callers
Function
MaxRecursionDepth
MaxRecursionDepth limits the maximum depth the parser will attempt to parse the expression before giving up.
parser/options.go:37
↓ 5 callers
Function
MaybeMergeUnknowns
MaybeMergeUnknowns determines whether an input value and another, possibly nil, unknown will produce an unknown result. If the input `val` is another
common/types/unknown.go:278
↓ 5 callers
Function
MaybeNoSuchOverload
MaybeNoSuchOverload determines whether to propagate an error if one is provided as an argument, or to return an unknown set, or to produce a new error
common/decls/decls.go:422
↓ 5 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
cel/program.go:75
↓ 5 callers
Function
NewExtensionVersion
NewExtensionVersion creates a new extension version with a major, minor version.
common/ast/ast.go:549
↓ 5 callers
Function
NewFunctionReference
NewFunctionReference creates a ReferenceInfo instance for a set of function overloads.
common/ast/ast.go:480
↓ 5 callers
Function
NewHierarchicalActivation
NewHierarchicalActivation takes two activations and produces a new one which prioritizes resolution in the child first and parent(s) second.
interpreter/activation.go:151
↓ 5 callers
Function
NewInlineVariableWithAlias
NewInlineVariableWithAlias declares a variable name to be replaced by a checked expression. If the variable occurs more than once, the provided alias
cel/inlining.go:62
↓ 5 callers
Function
NewIssuesWithSourceInfo
NewIssuesWithSourceInfo returns an Issues struct from a common.Errors object with SourceInfo metatata which can be used with the `ReportErrorAtID` met
cel/env.go:986
↓ 5 callers
Method
NewMap
NewMap creates an Expr value representing a map literal expression
common/ast/factory.go:58
↓ 5 callers
Function
NewRefValMap
NewRefValMap returns a specialized traits.Mapper with CEL valued keys and values.
common/types/map.go:61
↓ 5 callers
Function
NewRuleComposer
NewRuleComposer creates a rule composer which stitches together rules within a policy into a single CEL expression.
policy/composer.go:47
↓ 5 callers
Method
NewSelect
NewSelect create a field traversal Expr value.
parser/macro.go:288
↓ 5 callers
Function
NewVariableWithDoc
NewVariableWithDoc creates a new variable declaration with usage documentation.
common/decls/decls.go:942
↓ 5 callers
Method
OffsetLocation
OffsetLocation returns the Location of the expression identifier.
parser/macro.go:291
↓ 5 callers
Method
OverloadID
OverloadID returns the overload id associated with the function specialization. Overload ids are stable across language boundaries and can be treated
interpreter/interpretable.go:126
↓ 5 callers
Method
Parse
Parse parses the expression represented by source and returns the result.
parser/parser.go:92
↓ 5 callers
Function
ParseStructTag
ParseStructTag configures the struct tag to parse. The 0th item in the tag is used as the name of the CEL field. For example: If the tag to parse is "
ext/native.go:194
↓ 5 callers
Method
RegisterDescriptor
RegisterDescriptor registers the contents of a protocol buffer `FileDescriptor`.
common/types/ref/provider.go:70
↓ 5 callers
Method
ReportErrorAtID
ReportErrorAtID reports an error at the given expression id.
policy/compiler.go:205
↓ 5 callers
Method
SetDisableMacros
SetDisableMacros disables the macros for the library.
common/env/env.go:659
← previous
next →
501–600 of 7,240, ranked by callers