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
↓ 10 callers
Method
Path
Path returns a field path through the provided type declarations to the type of the AstNode, or nil if the AstNode does not represent type directly re
checker/cost.go:61
↓ 10 callers
Function
PopulateMacroCalls
PopulateMacroCalls ensures that the original call signatures replaced by expanded macros are preserved in the `SourceInfo` of parse result.
parser/options.go:117
↓ 10 callers
Function
TypeToExprType
TypeToExprType converts a CEL-native type representation to a protobuf CEL Type representation.
common/types/types.go:602
↓ 10 callers
Method
assertYAMLType
(id int64, node *yaml.Node, nodeTypes ...yamlNodeType)
policy/parser.go:890
↓ 10 callers
Function
inTimeZone
(ts, tz ref.Val)
common/stdlib/standard.go:1025
↓ 10 callers
Method
setType
(e ast.Expr, t *types.Type)
checker/checker.go:672
↓ 10 callers
Function
timeZone
(tz ref.Val, visitor timestampVisitor)
common/types/timestamp.go:280
↓ 9 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
cel/options.go:305
↓ 9 callers
Method
Add
Add adds the costs and returns the sum. If add would result in an uint64 overflow for the min or max, the value is set to math.MaxUint64.
checker/cost.go:185
↓ 9 callers
Method
AddLetFn
AddLetFn adds a let function to the evaluation context.
repl/evaluator.go:626
↓ 9 callers
Method
AddVariables
AddVariables adds one or more variables to the config.
common/env/env.go:132
↓ 9 callers
Method
CollectMetadata
CollectMetadata records the source position information of a given YAML node, and returns the id associated with the source metadata which is returned
policy/parser.go:392
↓ 9 callers
Function
EnvironmentFile
EnvironmentFile returns an EnvOption which loads a serialized CEL environment from a file. The file must be in one of the following formats: - Textpro
tools/compiler/compiler.go:224
↓ 9 callers
Method
FindStructFieldType
FieldStructFieldType returns the field type for a checked type value. Returns false if the field could not be found.
common/types/provider.go:63
↓ 9 callers
Method
MacroCalls
MacroCalls returns a map of expression id to ast.Expr value where the id represents the expression node where the macro was inserted into the AST, and
common/ast/ast.go:310
↓ 9 callers
Method
MaybeAttribute
MaybeAttribute creates an attribute that refers to either a field selection or a namespaced variable name. Only expressions which have not been type-
interpreter/attributes.go:49
↓ 9 callers
Function
NewContextVariable
NewContextVariable returns a serializable context variable with a specific type name.
common/env/env.go:317
↓ 9 callers
Function
NewFunction
NewFunction creates a serializable function and overload set.
common/env/env.go:341
↓ 9 callers
Function
NewImport
NewImport returns a serializable import value from the qualified type name.
common/env/env.go:222
↓ 9 callers
Function
NewParser
NewParser creates a new Parser object with a set of functional options.
policy/parser.go:514
↓ 9 callers
Method
NewString
NewString creates a new ValueString from the YAML node.
policy/parser.go:407
↓ 9 callers
Method
NewValue
NewValue creates a new type value from a qualified name and map of field name to value. Note, for each value, the Val.ConvertToNative function will b
common/types/provider.go:71
↓ 9 callers
Method
PartialVars
PartialVars returns a PartialActivation where all variables not in the input variable set, but which have been configured in the environment, are mark
cel/env.go:755
↓ 9 callers
Method
Receive
Receive accepts a function name, overload id, and arguments and returns a value.
common/types/traits/receiver.go:23
↓ 9 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
common/decls/decls.go:479
↓ 9 callers
Method
SourceInfo
SourceInfo returns the policy file metadata about expression positions.
policy/parser.go:65
↓ 9 callers
Function
TypeDescs
TypeDescs adds type declarations from any protoreflect.FileDescriptor, protoregistry.Files, google.protobuf.FileDescriptorProto or google.protobuf.Fil
cel/options.go:370
↓ 9 callers
Method
TypeName
TypeName returns the type-erased fully qualified runtime type name. TypeName implements the ref.Type interface method.
common/types/types.go:372
↓ 9 callers
Method
append
(s string)
common/debug/debug.go:276
↓ 9 callers
Method
check
(e ast.Expr)
checker/checker.go:82
↓ 9 callers
Method
copy
()
repl/evaluator.go:400
↓ 9 callers
Method
cost
(e ast.Expr)
checker/cost.go:464
↓ 9 callers
Function
features
features sets the given feature flags. See list of Feature constants above.
cel/options.go:918
↓ 9 callers
Function
interpret
(t testing.TB, env *Env, expr string, vars any)
cel/cel_test.go:4013
↓ 9 callers
Function
isTypeTag
(node *yaml.Node, wantTag yamlNodeType)
policy/yaml.go:96
↓ 9 callers
Function
nilTestExpr
(t testing.TB)
common/ast/expr_test.go:495
↓ 9 callers
Function
testNativeEnv
testEnv initializes the test environment common to all tests.
ext/native_test.go:1100
↓ 9 callers
Function
updateContextPlans
Attempt to update context in place after an update. This is done eagerly to help avoid introducing an invalid 'let' expression. The planned expression
repl/evaluator.go:550
↓ 8 callers
Method
ActualCost
ActualCost returns the tracked cost through the course of execution when `CostTracking` is enabled. Otherwise, returns nil if the cost was not enabled
cel/program.go:139
↓ 8 callers
Function
BinaryBinding
BinaryBinding provides the implementation of a binary overload. The provided function is protected by a runtime type-guard which ensures runtime type
common/decls/decls.go:869
↓ 8 callers
Method
Column
1-based line number within source.
common/location.go:20
↓ 8 callers
Method
CreateEnv
CreateEnv creates a singleton CEL environment with the configured environment options.
tools/compiler/compiler.go:95
↓ 8 callers
Function
CrossTypeNumericComparisons
CrossTypeNumericComparisons toggles type-checker support for numeric comparisons across type See https://github.com/google/cel-spec/wiki/proposal-210
checker/options.go:29
↓ 8 callers
Function
EagerlyValidateDeclarations
EagerlyValidateDeclarations ensures that any collisions between configured declarations are caught at the time of the `NewEnv` call. Eagerly validati
cel/options.go:213
↓ 8 callers
Function
FunctionDocs
FunctionDocs configures documentation from a list of strings separated by newlines.
common/decls/decls.go:445
↓ 8 callers
Function
InferFileFormat
InferFileFormat infers the file format from the file path.
tools/compiler/compiler.go:201
↓ 8 callers
Function
InitEmptyLiteralContext
(p *LiteralContext)
parser/gen/cel_parser.go:5499
↓ 8 callers
Function
InitEmptyLiteralContext
(p *LiteralContext)
repl/parser/commands_parser.go:9457
↓ 8 callers
Function
JSONFieldNames
JSONFieldNames configures the Db to support proto field accesses by their JSON names.
common/types/pb/pb.go:91
↓ 8 callers
Method
Kind
()
common/ast/expr.go:329
↓ 8 callers
Method
NewComprehension
NewComprehension creates a new one-variable comprehension instruction. - iterRange represents the expression that resolves to a list or map where the
parser/macro.go:236
↓ 8 callers
Method
NewIdent
NewIdent creates an identifier Expr value.
parser/macro.go:270
↓ 8 callers
Method
NewList
NewList creates a CreateList instruction where the list is comprised of the optional set of elements provided as arguments.
cel/macro.go:81
↓ 8 callers
Method
NewMap
NewMap creates a CreateStruct instruction for a map where the map is comprised of the optional set of key, value entries.
parser/macro.go:209
↓ 8 callers
Method
NewMemberCall
NewMemberCall creates a function call Expr value for a receiver-style function.
parser/macro.go:282
↓ 8 callers
Function
NewPartialAttributeFactory
NewPartialAttributeFactory returns an AttributeFactory implementation capable of performing AttributePattern matches with PartialActivation inputs.
interpreter/attribute_patterns.go:182
↓ 8 callers
Function
NewRefValList
NewRefValList returns a traits.Lister with ref.Val elements. This type specialization is used with list literals within CEL expressions.
common/types/list.go:60
↓ 8 callers
Method
NewSelect
NewSelect creates an Expr representing a field selection on an operand expression.
common/ast/factory.go:68
↓ 8 callers
Function
NewStringStringMap
NewStringStringMap returns a specialized traits.Mapper with string keys and values.
common/types/map.go:81
↓ 8 callers
Method
OffsetRanges
OffsetRanges returns a map of expression id to OffsetRange values where the range indicates either: the start and end position in the input stream whe
common/ast/ast.go:344
↓ 8 callers
Function
OverloadCostEstimate
OverloadCostEstimate binds a FunctionCoster to a specific function overload ID. When a OverloadCostEstimate is provided, it will override the cost ca
checker/cost.go:277
↓ 8 callers
Function
OverloadCostTracker
OverloadCostTracker binds an overload ID to a runtime FunctionTracker implementation. OverloadCostTracker instances augment or override ActualCostEst
interpreter/runtimecost.go:215
↓ 8 callers
Method
Pop
Pop returns the parent frame, releasing the current frame back to the pool.
interpreter/frame.go:147
↓ 8 callers
Method
QualString
QualString adds a string qualifier pattern to the AttributePattern. The string may be a valid identifier, or string map key including empty string.
interpreter/attribute_patterns.go:63
↓ 8 callers
Method
ResidualAst
ResidualAst takes an Ast and its EvalDetails to produce a new Ast which only contains the attribute references which are unknown. Residual expression
cel/env.go:785
↓ 8 callers
Method
SetConfig
SetConfig sets the set of map key-value pairs associated with this validator's configuration.
common/env/env.go:718
↓ 8 callers
Method
SetKindCase
SetKindCase replaces the contents of the current expression with the contents of the other. The SetKindCase takes ownership of any expression instanc
common/ast/expr.go:113
↓ 8 callers
Function
StringsVersion
StringsVersion configures the version of the string library. The version limits which functions are available. Only functions introduced below or equ
ext/strings.go:363
↓ 8 callers
Method
Type
Type returns the type constructed.
interpreter/interpretable.go:142
↓ 8 callers
Function
ValidateHomogeneousAggregateLiterals
ValidateHomogeneousAggregateLiterals checks that all list and map literals entries have the same types, i.e. no mixed list element types or mixed map
cel/validator.go:219
↓ 8 callers
Method
computeEntrySize
(e ast.Expr)
checker/cost.go:977
↓ 8 callers
Function
durationOf
(d time.Duration)
common/types/duration.go:39
↓ 8 callers
Function
eval
eval will evaluate a given program `prg` against a set of variables `vars` and return the output, eval details (optional), or error that results from
codelab/solution/codelab.go:404
↓ 8 callers
Function
file_test_proto2pb_test_all_types_proto_rawDescGZIP
()
test/proto2pb/test_all_types.pb.go:1256
↓ 8 callers
Method
getPath
(e ast.Expr)
checker/cost.go:886
↓ 8 callers
Function
newTestRegistry
(t testing.TB)
checker/env_test.go:107
↓ 8 callers
Function
rangedSizeEstimate
(min, max uint64)
ext/costs.go:88
↓ 8 callers
Method
typeOf
(id int64)
ext/formatting_v2.go:547
↓ 8 callers
Method
typeOf
(id int64)
ext/formatting.go:607
↓ 8 callers
Method
visit
(expr ast.Expr)
parser/unparser.go:87
↓ 7 callers
Method
Add
Add one or more overloads, returning an error if any Overload has the same Overload#Name.
interpreter/dispatcher.go:26
↓ 7 callers
Method
AddExtensions
AddExtensions appends a set of extensions to the config.
common/env/env.go:198
↓ 7 callers
Method
AddImports
AddImports appends a set of imports to the config.
common/env/env.go:192
↓ 7 callers
Method
AddIncludedFunctions
AddIncludedFunctions allow-lists one or more functions from the subset. Note, this option will override any excluded functions.
common/env/env.go:681
↓ 7 callers
Method
AddValidators
AddValidators appends one or more validators to the config.
common/env/env.go:204
↓ 7 callers
Function
AstToCheckedExpr
AstToCheckedExpr converts an Ast to an protobuf CheckedExpr value. If the Ast.IsChecked() returns false, this conversion method will return an error.
cel/io.go:61
↓ 7 callers
Function
AttributePattern
AttributePattern returns an AttributePattern that matches a top-level variable. The pattern is mutable, and its methods support the specification of o
cel/program.go:112
↓ 7 callers
Method
CollectMetadata
CollectMetadata records the source position information of a given YAML node, and returns the id associated with the source metadata which is returned
policy/parser.go:682
↓ 7 callers
Function
ContextProtoVars
ContextProtoVars uses the fields of the input proto.Messages as top-level variables within an Activation. Consider using with `DeclareContextProto` t
cel/options.go:861
↓ 7 callers
Method
CopyASTAndMetadata
CopyASTAndMetadata copies the input AST and propagates the macro metadata into the AST being optimized.
cel/optimizer.go:293
↓ 7 callers
Function
CostEstimatorOptions
CostEstimatorOptions configure type-check time options for estimating expression cost.
cel/options.go:739
↓ 7 callers
Function
CostTrackerOptions
CostTrackerOptions configures a set of options for cost-tracking. Note, CostTrackerOptions is a no-op unless CostTracking is also enabled.
cel/options.go:749
↓ 7 callers
Method
Expr
()
parser/gen/cel_parser.go:600
↓ 7 callers
Function
FromConfig
FromConfig produces and applies a set of EnvOption values derived from an env.Config object. For configuration elements which refer to features outsi
cel/options.go:533
↓ 7 callers
Method
GetE
GetE returns the e rule contexts.
repl/parser/commands_parser.go:955
↓ 7 callers
Method
GetName
()
test/proto2pb/test_all_types.pb.go:780
↓ 7 callers
Method
GetStartLocation
GetStartLocation calculates the human-readable 1-based line and 0-based column of the first character of the expression node at the id.
common/ast/ast.go:377
↓ 7 callers
Method
HasBinding
HasBinding indicates whether the overload already has a definition.
common/decls/decls.go:752
↓ 7 callers
Function
InitEmptyPrimaryContext
(p *PrimaryContext)
parser/gen/cel_parser.go:2810
↓ 7 callers
Function
InitEmptyPrimaryContext
(p *PrimaryContext)
repl/parser/commands_parser.go:6768
← previous
next →
301–400 of 7,240, ranked by callers