MCPcopy Create free account

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

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

↓ 6 callersFunctionProtos
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 callersMethodQualifyIfPresent
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 callersMethodRecoverInline
(recognizer antlr.Parser)
parser/parser.go:293
↓ 6 callersMethodRegisterMessage
RegisterMessage registers a protocol buffer message and its dependencies.
common/types/ref/provider.go:73
↓ 6 callersMethodRegisterType
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 callersFunctionSerializeTypeDesc
SerializeTypeDesc converts a CEL native *types.Type to a serializable TypeDesc.
common/env/env.go:969
↓ 6 callersMethodSetContainer
SetContainer configures the container name for this configuration.
common/env/env.go:110
↓ 6 callersMethodSetDisabled
SetDisabled disables or enables the library.
common/env/env.go:653
↓ 6 callersFunctionSingletonFunctionBinding
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 callersFunctionSingletonUnaryBinding
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 callersMethodSource
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 callersMethodSubtract
Subtract returns the result of subtracting the input from the current value.
common/types/traits/math.go:61
↓ 6 callersFunctionTestExpression
TestExpression returns a TestRunnerOption which configures a policy file, expression file, or raw expression for testing
tools/celtest/test_runner.go:436
↓ 6 callersFunctionToAdornedDebugString
ToAdornedDebugString gives the adorned string representation of the Expr.
common/debug/debug.go:61
↓ 6 callersFunctionUnparse
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 callersMethodUnwrap
Unwrap returns the Activation which omits local state.
interpreter/interpreter.go:113
↓ 6 callersMethodcomputeSize
(e ast.Expr)
checker/cost.go:943
↓ 6 callersFunctionestimateAllocatingListCall
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 callersFunctionextractIterVars
(mef cel.MacroExprFactory, arg0, arg1 ast.Expr)
ext/comprehensions.go:401
↓ 6 callersFunctionfile_test_proto3pb_test_all_types_proto_rawDescGZIP
()
test/proto3pb/test_all_types.pb.go:1118
↓ 6 callersMethodgetType
(e ast.Expr)
checker/cost.go:882
↓ 6 callersMethodisAssignable
(t1, t2 *types.Type)
checker/checker.go:640
↓ 6 callersFunctionisDyn
isDyn returns true if the input t is either type DYN or a well-known ANY message.
checker/types.go:22
↓ 6 callersMethodmaybeCreateLiteral
(id int64, val ref.Val)
interpreter/prune.go:89
↓ 6 callersMethodmaybeValue
(id int64)
interpreter/prune.go:473
↓ 6 callersMethodnewLiteral
(ctx any, value ref.Val)
parser/helper.go:48
↓ 6 callersMethodsetup
(t testing.TB, env *cel.Env, ast *cel.Ast)
policy/compiler_test.go:334
↓ 6 callersMethodskipWhitespace
()
common/env/io.go:236
↓ 6 callersFunctiontestCheckCost
(t *testing.T, env *cel.Env, ast *cel.Ast, hints map[string]uint64, wantEst checker.CostEstimate)
ext/sets_test.go:488
↓ 6 callersFunctiontestCompreEnv
(t *testing.T, opts ...cel.EnvOption)
ext/comprehensions_test.go:795
↓ 6 callersFunctiontestMustParse
(t testing.TB, data any)
interpreter/interpreter_test.go:2352
↓ 6 callersMethodtypeMismatch
(id int64, l common.Location, expected, actual *types.Type)
checker/errors.go:73
↓ 6 callersMethodvisitMaybeNested
(expr ast.Expr, nested bool)
parser/unparser.go:458
↓ 5 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
common/containers/container.go:213
↓ 5 callersMethodAddExcludedFunctions
AddExcludedFunctions deny-lists one or more functions from the subset.
common/env/env.go:687
↓ 5 callersMethodAliasSet
AliasSet returns the alias to fully-qualified name mapping stored in the container.
common/containers/container.go:137
↓ 5 callersMethodAppend
Append collects the issues from another Issues struct into a new Issues object.
cel/env.go:1013
↓ 5 callersMethodAsCost
AsCost converts a size estimates to an equivalent cost estimate.
checker/cost.go:163
↓ 5 callersMethodAsPartialActivation
AsPartialActivation converts the current activation to a PartialActivation
interpreter/activation.go:181
↓ 5 callersFunctionAstToParsedExpr
AstToParsedExpr converts an Ast to an protobuf ParsedExpr value.
cel/io.go:90
↓ 5 callersFunctionBindingsVersion
BindingsVersion sets the version of the bindings library to an explicit version.
ext/bindings.go:73
↓ 5 callersFunctionCheckedExprToAst
CheckedExprToAst converts a checked expression proto message to an Ast.
cel/io.go:37
↓ 5 callersMethodCheckedType
CheckedType returns the type-definition used at type-check time.
common/types/pb/type.go:222
↓ 5 callersMethodComputeOffset
ComputeOffset calculates the 0-based character offset from a 1-based line and 0-based column.
common/ast/ast.go:411
↓ 5 callersFunctionConstantValueMatcher
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 callersFunctionCustomDecoratorV2
CustomDecoratorV2 configures a custom V2 interpretable decorator for the program.
interpreter/interpreter.go:165
↓ 5 callersFunctionCustomTypeAdapter
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 callersFunctionCustomTypeProvider
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 callersMethodDeclarationIsEquivalent
DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input.
common/decls/decls.go:998
↓ 5 callersFunctionDeclareContextProto
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 callersFunctionEnableIdentifierEscapeSyntax
EnableIdentifierEscapeSyntax enables identifier escaping (`) syntax for fields.
cel/options.go:902
↓ 5 callersFunctionEncoders
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 callersMethodEnumValue
EnumValue returns the numeric value of the given enum value name.
common/types/provider.go:43
↓ 5 callersMethodEquals
Equals returns whether two references are identical to each other.
common/ast/ast.go:499
↓ 5 callersFunctionErrorRecoveryLookaheadTokenLimit
ErrorRecoveryLookaheadTokenLimit limits the number of lexer tokens that may be considered during error recovery. Error recovery often involves lookin
parser/options.go:54
↓ 5 callersMethodErrors
Errors returns the collection of errors encountered in more granular detail.
cel/env.go:1005
↓ 5 callersFunctionEvalStateFactory
EvalStateFactory configures the EvalState generator to be used by the EvalStateObserver.
interpreter/interpreter.go:85
↓ 5 callersFunctionExhaustiveEval
ExhaustiveEval replaces operations that short-circuit with versions that evaluate expressions and couples this behavior with the TrackState() decorato
interpreter/interpreter.go:177
↓ 5 callersMethodExtend
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 callersFunctionExtendedValidations
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 callersFunctionExtensionOptionFactory
ExtensionOptionFactory converts an ExtensionConfig value to a CEL environment option.
ext/extension_option_factory.go:25
↓ 5 callersMethodFieldMap
FieldMap returns a string field name to FieldDescription map.
common/types/pb/type.go:101
↓ 5 callersMethodFindFieldType
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 callersMethodFindType
FindType looks up the Type given a qualified typeName. Returns false if not found.
common/types/ref/provider.go:36
↓ 5 callersMethodFunctions
Functions returns a shallow copy of the Functions, keyed by function name, that have been configured in the environment.
cel/env.go:624
↓ 5 callersMethodGetArgs
GetArgs returns the args token list.
repl/parser/commands_parser.go:2268
↓ 5 callersMethodGetOps
GetOps returns the ops token list.
repl/parser/commands_parser.go:4642
↓ 5 callersMethodGetOpt
GetOpt returns the opt token.
repl/parser/commands_parser.go:9276
↓ 5 callersMethodGetOrDefault
(name string, value any)
cel/validator.go:129
↓ 5 callersMethodGetTok
()
parser/gen/cel_parser.go:5901
↓ 5 callersMethodHasFeature
HasFeature checks whether the environment enables the given feature flag, as enumerated in options.go.
cel/env.go:597
↓ 5 callersMethodHasLibrary
HasLibrary returns whether a specific SingletonLibrary has been configured in the environment.
cel/env.go:603
↓ 5 callersMethodIsAssignableRuntimeType
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 callersMethodIsNonStrict
IsNonStrict returns whether the overload accepts errors and unknown values as arguments.
common/decls/decls.go:668
↓ 5 callersFunctionJSONFieldNames
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 callersFunctionK8sTestTagHandler
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 callersMethodLineOffsets
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 callersFunctionMatchSubset
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 callersMethodMatches
Matches returns the list of matches associated with the rule.
policy/compiler.go:55
↓ 5 callersFunctionMaxRecursionDepth
MaxRecursionDepth limits the maximum depth the parser will attempt to parse the expression before giving up.
parser/options.go:37
↓ 5 callersFunctionMaybeMergeUnknowns
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 callersFunctionMaybeNoSuchOverload
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 callersFunctionNewActivation
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 callersFunctionNewExtensionVersion
NewExtensionVersion creates a new extension version with a major, minor version.
common/ast/ast.go:549
↓ 5 callersFunctionNewFunctionReference
NewFunctionReference creates a ReferenceInfo instance for a set of function overloads.
common/ast/ast.go:480
↓ 5 callersFunctionNewHierarchicalActivation
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 callersFunctionNewInlineVariableWithAlias
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 callersFunctionNewIssuesWithSourceInfo
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 callersMethodNewMap
NewMap creates an Expr value representing a map literal expression
common/ast/factory.go:58
↓ 5 callersFunctionNewRefValMap
NewRefValMap returns a specialized traits.Mapper with CEL valued keys and values.
common/types/map.go:61
↓ 5 callersFunctionNewRuleComposer
NewRuleComposer creates a rule composer which stitches together rules within a policy into a single CEL expression.
policy/composer.go:47
↓ 5 callersMethodNewSelect
NewSelect create a field traversal Expr value.
parser/macro.go:288
↓ 5 callersFunctionNewVariableWithDoc
NewVariableWithDoc creates a new variable declaration with usage documentation.
common/decls/decls.go:942
↓ 5 callersMethodOffsetLocation
OffsetLocation returns the Location of the expression identifier.
parser/macro.go:291
↓ 5 callersMethodOverloadID
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 callersMethodParse
Parse parses the expression represented by source and returns the result.
parser/parser.go:92
↓ 5 callersFunctionParseStructTag
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 callersMethodRegisterDescriptor
RegisterDescriptor registers the contents of a protocol buffer `FileDescriptor`.
common/types/ref/provider.go:70
↓ 5 callersMethodReportErrorAtID
ReportErrorAtID reports an error at the given expression id.
policy/compiler.go:205
↓ 5 callersMethodSetDisableMacros
SetDisableMacros disables the macros for the library.
common/env/env.go:659
← previousnext →501–600 of 7,240, ranked by callers