MCPcopy Create free account

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

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

↓ 10 callersMethodPath
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 callersFunctionPopulateMacroCalls
PopulateMacroCalls ensures that the original call signatures replaced by expanded macros are preserved in the `SourceInfo` of parse result.
parser/options.go:117
↓ 10 callersFunctionTypeToExprType
TypeToExprType converts a CEL-native type representation to a protobuf CEL Type representation.
common/types/types.go:602
↓ 10 callersMethodassertYAMLType
(id int64, node *yaml.Node, nodeTypes ...yamlNodeType)
policy/parser.go:890
↓ 10 callersFunctioninTimeZone
(ts, tz ref.Val)
common/stdlib/standard.go:1025
↓ 10 callersMethodsetType
(e ast.Expr, t *types.Type)
checker/checker.go:672
↓ 10 callersFunctiontimeZone
(tz ref.Val, visitor timestampVisitor)
common/types/timestamp.go:280
↓ 9 callersFunctionAbbrevs
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 callersMethodAdd
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 callersMethodAddLetFn
AddLetFn adds a let function to the evaluation context.
repl/evaluator.go:626
↓ 9 callersMethodAddVariables
AddVariables adds one or more variables to the config.
common/env/env.go:132
↓ 9 callersMethodCollectMetadata
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 callersFunctionEnvironmentFile
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 callersMethodFindStructFieldType
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 callersMethodMacroCalls
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 callersMethodMaybeAttribute
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 callersFunctionNewContextVariable
NewContextVariable returns a serializable context variable with a specific type name.
common/env/env.go:317
↓ 9 callersFunctionNewFunction
NewFunction creates a serializable function and overload set.
common/env/env.go:341
↓ 9 callersFunctionNewImport
NewImport returns a serializable import value from the qualified type name.
common/env/env.go:222
↓ 9 callersFunctionNewParser
NewParser creates a new Parser object with a set of functional options.
policy/parser.go:514
↓ 9 callersMethodNewString
NewString creates a new ValueString from the YAML node.
policy/parser.go:407
↓ 9 callersMethodNewValue
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 callersMethodPartialVars
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 callersMethodReceive
Receive accepts a function name, overload id, and arguments and returns a value.
common/types/traits/receiver.go:23
↓ 9 callersFunctionSingletonUnaryBinding
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 callersMethodSourceInfo
SourceInfo returns the policy file metadata about expression positions.
policy/parser.go:65
↓ 9 callersFunctionTypeDescs
TypeDescs adds type declarations from any protoreflect.FileDescriptor, protoregistry.Files, google.protobuf.FileDescriptorProto or google.protobuf.Fil
cel/options.go:370
↓ 9 callersMethodTypeName
TypeName returns the type-erased fully qualified runtime type name. TypeName implements the ref.Type interface method.
common/types/types.go:372
↓ 9 callersMethodappend
(s string)
common/debug/debug.go:276
↓ 9 callersMethodcheck
(e ast.Expr)
checker/checker.go:82
↓ 9 callersMethodcopy
()
repl/evaluator.go:400
↓ 9 callersMethodcost
(e ast.Expr)
checker/cost.go:464
↓ 9 callersFunctionfeatures
features sets the given feature flags. See list of Feature constants above.
cel/options.go:918
↓ 9 callersFunctioninterpret
(t testing.TB, env *Env, expr string, vars any)
cel/cel_test.go:4013
↓ 9 callersFunctionisTypeTag
(node *yaml.Node, wantTag yamlNodeType)
policy/yaml.go:96
↓ 9 callersFunctionnilTestExpr
(t testing.TB)
common/ast/expr_test.go:495
↓ 9 callersFunctiontestNativeEnv
testEnv initializes the test environment common to all tests.
ext/native_test.go:1100
↓ 9 callersFunctionupdateContextPlans
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 callersMethodActualCost
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 callersFunctionBinaryBinding
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 callersMethodColumn
1-based line number within source.
common/location.go:20
↓ 8 callersMethodCreateEnv
CreateEnv creates a singleton CEL environment with the configured environment options.
tools/compiler/compiler.go:95
↓ 8 callersFunctionCrossTypeNumericComparisons
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 callersFunctionEagerlyValidateDeclarations
EagerlyValidateDeclarations ensures that any collisions between configured declarations are caught at the time of the `NewEnv` call. Eagerly validati
cel/options.go:213
↓ 8 callersFunctionFunctionDocs
FunctionDocs configures documentation from a list of strings separated by newlines.
common/decls/decls.go:445
↓ 8 callersFunctionInferFileFormat
InferFileFormat infers the file format from the file path.
tools/compiler/compiler.go:201
↓ 8 callersFunctionInitEmptyLiteralContext
(p *LiteralContext)
parser/gen/cel_parser.go:5499
↓ 8 callersFunctionInitEmptyLiteralContext
(p *LiteralContext)
repl/parser/commands_parser.go:9457
↓ 8 callersFunctionJSONFieldNames
JSONFieldNames configures the Db to support proto field accesses by their JSON names.
common/types/pb/pb.go:91
↓ 8 callersMethodKind
()
common/ast/expr.go:329
↓ 8 callersMethodNewComprehension
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 callersMethodNewIdent
NewIdent creates an identifier Expr value.
parser/macro.go:270
↓ 8 callersMethodNewList
NewList creates a CreateList instruction where the list is comprised of the optional set of elements provided as arguments.
cel/macro.go:81
↓ 8 callersMethodNewMap
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 callersMethodNewMemberCall
NewMemberCall creates a function call Expr value for a receiver-style function.
parser/macro.go:282
↓ 8 callersFunctionNewPartialAttributeFactory
NewPartialAttributeFactory returns an AttributeFactory implementation capable of performing AttributePattern matches with PartialActivation inputs.
interpreter/attribute_patterns.go:182
↓ 8 callersFunctionNewRefValList
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 callersMethodNewSelect
NewSelect creates an Expr representing a field selection on an operand expression.
common/ast/factory.go:68
↓ 8 callersFunctionNewStringStringMap
NewStringStringMap returns a specialized traits.Mapper with string keys and values.
common/types/map.go:81
↓ 8 callersMethodOffsetRanges
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 callersFunctionOverloadCostEstimate
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 callersFunctionOverloadCostTracker
OverloadCostTracker binds an overload ID to a runtime FunctionTracker implementation. OverloadCostTracker instances augment or override ActualCostEst
interpreter/runtimecost.go:215
↓ 8 callersMethodPop
Pop returns the parent frame, releasing the current frame back to the pool.
interpreter/frame.go:147
↓ 8 callersMethodQualString
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 callersMethodResidualAst
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 callersMethodSetConfig
SetConfig sets the set of map key-value pairs associated with this validator's configuration.
common/env/env.go:718
↓ 8 callersMethodSetKindCase
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 callersFunctionStringsVersion
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 callersMethodType
Type returns the type constructed.
interpreter/interpretable.go:142
↓ 8 callersFunctionValidateHomogeneousAggregateLiterals
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 callersMethodcomputeEntrySize
(e ast.Expr)
checker/cost.go:977
↓ 8 callersFunctiondurationOf
(d time.Duration)
common/types/duration.go:39
↓ 8 callersFunctioneval
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 callersFunctionfile_test_proto2pb_test_all_types_proto_rawDescGZIP
()
test/proto2pb/test_all_types.pb.go:1256
↓ 8 callersMethodgetPath
(e ast.Expr)
checker/cost.go:886
↓ 8 callersFunctionnewTestRegistry
(t testing.TB)
checker/env_test.go:107
↓ 8 callersFunctionrangedSizeEstimate
(min, max uint64)
ext/costs.go:88
↓ 8 callersMethodtypeOf
(id int64)
ext/formatting_v2.go:547
↓ 8 callersMethodtypeOf
(id int64)
ext/formatting.go:607
↓ 8 callersMethodvisit
(expr ast.Expr)
parser/unparser.go:87
↓ 7 callersMethodAdd
Add one or more overloads, returning an error if any Overload has the same Overload#Name.
interpreter/dispatcher.go:26
↓ 7 callersMethodAddExtensions
AddExtensions appends a set of extensions to the config.
common/env/env.go:198
↓ 7 callersMethodAddImports
AddImports appends a set of imports to the config.
common/env/env.go:192
↓ 7 callersMethodAddIncludedFunctions
AddIncludedFunctions allow-lists one or more functions from the subset. Note, this option will override any excluded functions.
common/env/env.go:681
↓ 7 callersMethodAddValidators
AddValidators appends one or more validators to the config.
common/env/env.go:204
↓ 7 callersFunctionAstToCheckedExpr
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 callersFunctionAttributePattern
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 callersMethodCollectMetadata
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 callersFunctionContextProtoVars
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 callersMethodCopyASTAndMetadata
CopyASTAndMetadata copies the input AST and propagates the macro metadata into the AST being optimized.
cel/optimizer.go:293
↓ 7 callersFunctionCostEstimatorOptions
CostEstimatorOptions configure type-check time options for estimating expression cost.
cel/options.go:739
↓ 7 callersFunctionCostTrackerOptions
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 callersMethodExpr
()
parser/gen/cel_parser.go:600
↓ 7 callersFunctionFromConfig
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 callersMethodGetE
GetE returns the e rule contexts.
repl/parser/commands_parser.go:955
↓ 7 callersMethodGetName
()
test/proto2pb/test_all_types.pb.go:780
↓ 7 callersMethodGetStartLocation
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 callersMethodHasBinding
HasBinding indicates whether the overload already has a definition.
common/decls/decls.go:752
↓ 7 callersFunctionInitEmptyPrimaryContext
(p *PrimaryContext)
parser/gen/cel_parser.go:2810
↓ 7 callersFunctionInitEmptyPrimaryContext
(p *PrimaryContext)
repl/parser/commands_parser.go:6768
← previousnext →301–400 of 7,240, ranked by callers