MCPcopy Create free account

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

Functions9,178 in github.com/cel-expr/cel-go

↓ 22 callersMethodOptimize
Optimize applies a sequence of optimizations to an Ast within a given environment. If issues are encountered, the Issues.Err() return value will be n
cel/optimizer.go:77
↓ 22 callersMethodSourceInfo
SourceInfo returns character offset and newline position information about expression elements.
cel/env.go:85
↓ 22 callersMethodValue
Value returns the observed value of the given expression id if found, and a nil false result if not.
interpreter/evalstate.go:28
↓ 22 callersFunctionmustTypeCheck
(t testing.TB, expr string, opts ...any)
common/ast/navigable_test.go:634
↓ 21 callersMethodAddFunctions
AddFunctions configures the checker with a list of function declarations. If there are overlapping declarations, the method will error.
checker/env.go:145
↓ 21 callersMethodAsStructField
AsStructField casts the EntryExpr to a StructField The Kind() must be equal to StructFieldKind for the conversion to be well-defined.
common/ast/expr.go:150
↓ 21 callersMethodDescribeType
DescribeType returns a `TypeDescription` for the `typeName` if it exists in the `pb.Db`.
common/types/pb/pb.go:235
↓ 21 callersMethodError
()
parser/antlr_parser.go:140
↓ 21 callersFunctionEstimateSize
EstimateSize returns a SizeEstimate for the given node from its computed size, estimator, or unknown.
common/cost/cost.go:418
↓ 21 callersMethodEval
Eval evaluates an Activation and produces an output.
interpreter/interpretable.go:35
↓ 21 callersMethodIterVar
IterVar returns the iteration variable name. For one-variable comprehensions, the iter var refers to the element value when iterating over a list, or
common/ast/expr.go:278
↓ 21 callersFunctionMul
Mul creates an expression representing the product of the given terms.
common/cost/model.go:719
↓ 21 callersFunctionNewOpaqueType
NewOpaqueType creates an abstract parameterized type with a given name.
common/types/types.go:556
↓ 21 callersFunctionResult
Result creates an expression referencing the size of the result.
common/cost/model.go:631
↓ 21 callersMethodSet
(name string, value any)
cel/validator.go:162
↓ 21 callersFunctionmakeQualifier
(t testing.TB, attrs AttributeFactory, fieldType *types.Type, qualID int64, val any)
interpreter/attributes_test.go:1529
↓ 20 callersMethodCostTracker
CostTracker returns the active CostTracker for this evaluation pass, or nil.
interpreter/frame.go:373
↓ 20 callersFunctionDefaultSizingStrategy
DefaultSizingStrategy returns the default SizingStrategy implementation.
common/cost/default_strategy.go:27
↓ 20 callersMethodGetType
GetType returns the type for the expression at the given id, if one exists, else types.DynType.
common/ast/ast.go:51
↓ 20 callersFunctionLists
Lists returns a cel.EnvOption to configure extended functions for list manipulation. As a general note, all indices are zero-based. # Distinct Intro
ext/lists.go:226
↓ 20 callersFunctionMergeUnknowns
MergeUnknowns combines two unknown values into a new unknown value.
common/types/unknown.go:291
↓ 20 callersFunctionModelVersion
ModelVersion pins the revision of the cost model's estimation and runtime tracking rules. If this option is not set, the latest cost model version is
common/cost/version.go:294
↓ 20 callersFunctionNewAttributePattern
NewAttributePattern produces a new mutable AttributePattern based on a variable name.
interpreter/attribute_patterns.go:54
↓ 20 callersFunctionNewErrFromString
NewErrFromString creates a new Err with the provided message. TODO: Audit the use of this function and standardize the error messages and codes.
common/types/err.go:67
↓ 20 callersMethodNewList
NewList creates a list literal instruction with an optional set of elements.
parser/macro.go:205
↓ 20 callersFunctionRanged
Ranged creates an expression where the lower bound is taken from minExpr and the upper bound from maxExpr.
common/cost/model.go:891
↓ 20 callersMethodSize
Size returns the length of the argument list.
ext/formatting.go:778
↓ 20 callersMethodSlice
(i, j int)
common/runes/buffer.go:27
↓ 20 callersFunctionStringScan
StringScan creates an expression representing the cost of scanning a string.
common/cost/model.go:927
↓ 20 callersMethodTypeName
TypeName returns the qualified type name of the type. The type name is also used as the type's identifier name at type-check and interpretation time.
common/types/ref/reference.go:32
↓ 20 callersMethodnextToken
()
parser/pratt_parser.go:246
↓ 20 callersMethodtrack
(ctx TrackContext)
common/cost/model.go:100
↓ 19 callersFunctionActualSize
ActualSize returns the size of the value for all traits.Sizer values, and returns a size of 1 for all other value types.
common/cost/cost.go:410
↓ 19 callersMethodIterVar2
IterVar2 returns the second iteration variable name. When the value is non-empty, the comprehension is a two-variable comprehension.
common/ast/expr.go:283
↓ 19 callersFunctionLib
Lib creates an EnvOption out of a Library, allowing libraries to be provided as functional args, and to be linked to each other.
cel/library.go:103
↓ 19 callersFunctionMin
Min creates an expression representing the minimum of two quantities.
common/cost/model.go:787
↓ 19 callersFunctionNewRefValMap
NewRefValMap returns a specialized traits.Mapper with CEL valued keys and values.
common/types/map.go:75
↓ 19 callersMethodOptionalIndices
OptionalIndicies returns the list of optional indices in the list literal.
common/ast/expr.go:185
↓ 19 callersMethodReferenceMap
ReferenceMap returns the map of expression id to identifier, constant, and function references.
common/ast/ast.go:87
↓ 19 callersMethodestimate
(ctx EstimateContext)
common/cost/model.go:99
↓ 18 callersMethodAddIdents
AddIdents configures the checker with a list of variable declarations. If there are overlapping declarations, the method will error.
checker/env.go:134
↓ 18 callersFunctionAtMost
AtMost creates an expression representing a quantity bounded between 0 and the upper bound of maxExpr.
common/cost/model.go:896
↓ 18 callersMethodBindings
Bindings produces a set of function bindings, if any are defined.
common/decls/decls.go:360
↓ 18 callersFunctionCompare
Compare compares two strings, a for actual, e for expected, and returns true or false. The comparison is done, by filtering out whitespace (i.e. space
test/compare.go:24
↓ 18 callersMethodCompare
Compare this value to the input other value, returning an Int: this < other -> Int(-1) this == other -> Int(0) this > other -> Int(1) If the com
common/types/traits/comparer.go:32
↓ 18 callersFunctionCostModel
CostModel configures overload cost estimators and cost trackers from a set of cost.OverloadModel definitions. Models are validated here because neith
cel/options.go:882
↓ 18 callersFunctionFunctionBinding
FunctionBinding provides the implementation of a variadic overload. The provided function is protected by a runtime type-guard which ensures runtime t
cel/decls.go:343
↓ 18 callersFunctionIsUnknownOrError
IsUnknownOrError returns whether the input element ref.Val is an ErrType or UnknownType.
common/types/util.go:22
↓ 18 callersFunctionLabelErrNode
LabelErrNode returns val unaltered it is not an Err or if the error has a non-zero AST node ID already present. Otherwise the id is added to the error
common/types/err.go:80
↓ 18 callersFunctionMacros
Macros option extends the macro set configured in the environment. Note: This option must be specified after ClearMacros if used together.
cel/options.go:268
↓ 18 callersFunctionManualCost
ManualCost sets a custom FunctionEstimator and FunctionTracker for an overload whose cost or result size cannot be expressed declaratively with EvalCo
common/cost/model.go:1119
↓ 18 callersFunctionName
Name sets the fully-qualified name of the Container.
common/containers/container.go:295
↓ 18 callersFunctionNewMap
NewMap returns a traits.Mapper backed by a typed Go map[K]V.
common/types/map.go:51
↓ 18 callersFunctionNewOptionalType
NewOptionalType creates an abstract parameterized type instance corresponding to CEL's notion of optional.
common/types/types.go:551
↓ 18 callersFunctionNewSourceInfo
NewSourceInfo creates a simple SourceInfo object from an input common.Source value.
common/ast/ast.go:201
↓ 18 callersFunctionNewStringSource
NewStringSource creates a new Source from the given contents and description.
common/source.go:84
↓ 18 callersMethodNewStruct
NewStruct creates an Expr value representing a struct literal with a given type name and a set of field initializers.
common/ast/factory.go:72
↓ 18 callersFunctionNewTypeDesc
NewTypeDesc describes a simple or complex type with parameters.
common/env/env.go:780
↓ 18 callersFunctionValOrErr
ValOrErr either returns the existing error or creates a new one. TODO: Audit the use of this function and standardize the error messages and codes.
common/types/err.go:107
↓ 18 callersMethodValidate
Validate validates a given Ast within an Environment and collects a set of potential issues. The ValidatorConfig is generated from the set of ASTVali
cel/validator.go:138
↓ 18 callersFunctionmustNewExecutionFrame
(t testing.TB, input any)
interpreter/frame_test.go:713
↓ 18 callersMethodreportError
(ctx any, format string, args ...any)
parser/antlr_parser.go:810
↓ 18 callersFunctiontestNativeEnv
testEnv initializes the test environment common to all tests.
common/types/native_test.go:1863
↓ 17 callersMethodAdd
Add one or more overloads, returning an error if any Overload has the same Overload#Name.
interpreter/dispatcher.go:26
↓ 17 callersMethodArgs
Args returns the normalized arguments to the function overload. For receiver-style functions, the receiver target is arg 0.
interpreter/interpretable.go:130
↓ 17 callersMethodCELTypeProvider
CELTypeProvider returns the `types.Provider` configured for the environment.
cel/env.go:852
↓ 17 callersMethodFieldByName
FieldByName returns (FieldDescription, true) if the field name is declared within the type.
common/types/pb/type.go:109
↓ 17 callersMethodFindStructType
FindStructType returns the Type give a qualified type name. For historical reasons, only struct types are expected to be returned through this method
common/types/provider.go:60
↓ 17 callersFunctionFunctions
Functions returns the set of standard library function declarations and definitions for CEL.
common/stdlib/standard.go:908
↓ 17 callersMethodIsZeroValue
IsZeroValue indicates whether the object is the zero value for the type.
common/types/traits/zeroer.go:20
↓ 17 callersFunctionNewContainer
NewContainer creates a new Container with the fully-qualified name.
common/containers/container.go:36
↓ 17 callersFunctionNewErrors
NewErrors creates a new instance of the Errors type.
common/errors.go:32
↓ 17 callersFunctionNewPartialActivation
NewPartialActivation returns an Activation which contains a list of AttributePattern values representing field and index operations that should result
interpreter/activation.go:206
↓ 17 callersMethodResolveName
ResolveName returns a value from the activation by qualified name, or false if the name could not be found.
interpreter/activation.go:31
↓ 17 callersMethodResult
Result returns the size of the evaluated result, if present.
common/cost/model.go:73
↓ 17 callersFunctionTwoVarComprehensions
TwoVarComprehensions introduces support for two-variable comprehensions. The two-variable form of comprehensions looks similar to the one-variable co
ext/comprehensions.go:163
↓ 17 callersMethodVisit
Visitor implementations.
parser/antlr_parser.go:292
↓ 17 callersMethodcreateChild
(e Expr)
common/ast/navigable.go:374
↓ 17 callersFunctionhasTarget
hasTarget returns true if the expression or any of its subexpressions references the target object.
common/cost/model.go:118
↓ 17 callersMethodid
(ctx any)
parser/helper.go:167
↓ 17 callersFunctionmustAdaptToProto
(e ast.Expr)
cel/macro.go:561
↓ 16 callersFunctionAsyncBinding
AsyncBinding provides the implementation of an asynchronous overload. The provided function is called in its own goroutine with the provided context.
cel/decls.go:368
↓ 16 callersFunctionComposeTypes
ComposeTypes accepts a provider, adapter, and a list of types (ref.Type, proto.Message, protoreflect.FileDescriptor, or RegistryOption) and either: -
common/types/provider.go:205
↓ 16 callersFunctionElemOf
ElemOf creates an expression referencing the element size of another expression.
common/cost/model.go:344
↓ 16 callersMethodGetId
GetId returns the id rule contexts.
repl/parser/commands_parser.go:1568
↓ 16 callersMethodNewMemberCall
NewMemberCall creates an Expr value representing a member function call.
common/ast/factory.go:37
↓ 16 callersFunctionOptimize
Optimize will pre-compute operations such as list and map construction and optimize call arguments to set membership tests. The set of optimizations w
interpreter/interpreter.go:207
↓ 16 callersMethodOutputType
OutputType returns the output type of the expression if the Ast has been type-checked, else returns cel.DynType as the parse step cannot infer types.
cel/env.go:108
↓ 16 callersFunctionStdLib
StdLib returns an EnvOption for the standard library of CEL functions and macros.
cel/library.go:141
↓ 16 callersMethodTypeMap
TypeMap returns the map of expression ids to type-checked types. If the AST is not type-checked, the map will be empty.
common/ast/ast.go:69
↓ 16 callersFunctionsafeAddUint32
(a, b uint32)
common/types/overflow.go:431
↓ 15 callersMethodAddLetVar
AddLetVar adds a let variable to the evaluation context. The expression is planned but evaluated lazily.
repl/evaluator.go:612
↓ 15 callersMethodArgTypes
ArgTypes contains the set of argument types expected by the overload. For member functions ArgTypes[0] represents the member operand type.
common/decls/decls.go:717
↓ 15 callersFunctionCostModelVersion
CostModelVersion pins cost estimation and runtime cost tracking to a revision of the cost model's rules. The pin applies to the standard models and t
cel/options.go:913
↓ 15 callersMethodDescription
Description gives a brief description of the source. Example descriptions are a file name or ui element.
common/source.go:32
↓ 15 callersFunctionEnableOptionalSyntax
EnableOptionalSyntax enables syntax for optional field and index selection.
parser/options.go:140
↓ 15 callersFunctionExprToProto
ExprToProto serializes an ast.Expr value to a protobuf Expr representation.
common/ast/conversion.go:282
↓ 15 callersMethodIsExactType
IsExactType indicates whether the two types are exactly the same. This check also verifies type parameter type names.
common/types/types.go:274
↓ 15 callersMethodMerge
Merge combines an existing function declaration with another. If a function is extended, by say adding new overloads to an existing function, then it
common/decls/decls.go:146
↓ 15 callersFunctionNewValidator
NewValidator returns a named Validator instance.
common/env/env.go:695
← previousnext →201–300 of 9,178, ranked by callers