package
0.20.2
Repository: https://github.com/authzed/cel-go.git
Documentation: pkg.go.dev

# Functions

AllMatcher returns true for all descendants of a NavigableExpr, effectively flattening them into a list.
ConstantToVal converts a protobuf Constant to a CEL-native ref.Val.
ConstantValueMatcher returns an ExprMatcher which will return true if the input NavigableExpr is comprised of all constant values, such as a simple literal or even list and map literal.
Copy creates a deep copy of the Expr and SourceInfo values in the input AST.
CopySourceInfo creates a deep copy of the MacroCalls within the input SourceInfo.
EntryExprToProto converts an ast.EntryExpr to a protobuf CreateStruct entry.
ExprToProto serializes an ast.Expr value to a protobuf Expr representation.
FunctionMatcher returns an ExprMatcher which will match NavigableExpr nodes of CallKind type whose function name is equal to `funcName`.
KindMatcher returns an ExprMatcher which will return true if the input NavigableExpr.Kind() matches the specified `kind`.
MatchDescendants takes a NavigableExpr and ExprMatcher and produces a list of NavigableExpr values matching the input criteria in post-order (bottom up).
MatchSubset applies an ExprMatcher to a list of NavigableExpr values and their descendants, producing a subset of NavigableExpr values which match.
MaxID returns the upper-bound, non-inclusive, of ids present within the AST's Expr value.
NavigateAST converts an AST to a NavigableExpr.
NavigateExpr creates a NavigableExpr whose type information is backed by the input AST.
NewAST creates a base AST instance with an ast.Expr and ast.SourceInfo value.
NewCheckedAST wraps an parsed AST and augments it with type and reference metadata.
NewExprFactory creates an ExprFactory instance.
NewExprVisitor creates a visitor which only visits expression nodes.
NewFunctionReference creates a ReferenceInfo instance for a set of function overloads.
NewIdentReference creates a ReferenceInfo instance for an identifier with an optional constant value.
NewSourceInfo creates a simple SourceInfo object from an input common.Source value.
PostOrderVisit walks the expression graph and calls the visitor in post-order (bottom-up).
PreOrderVisit walks the expression graph and calls the visitor in pre-order (top-down).
ProtoToEntryExpr converts a protobuf struct/map entry to an ast.EntryExpr.
ProtoToExpr converts a protobuf Expr value to an ast.Expr value.
ProtoToReferenceInfo converts a protobuf Reference into a CEL-native ReferenceInfo instance.
ProtoToSourceInfo deserializes the protobuf into a native SourceInfo value.
ReferenceInfoToProto converts a ReferenceInfo instance to a protobuf Reference suitable for serialization.
SourceInfoToProto serializes an ast.SourceInfo value to a protobuf SourceInfo object.
ToAST converts a CheckedExpr protobuf to an AST instance.
ToProto converts an AST to a CheckedExpr protobouf.
ValToConstant converts a CEL-native ref.Val to a protobuf Constant.

# Constants

CallKind represents a function call.
ComprehensionKind represents a comprehension expression generated by a macro.
IdentKind represents a simple variable, constant, or type identifier.
ListKind represents a list literal expression.
LiteralKind represents a primitive scalar literal.
MapEntryKind indicates that the entry is a MapEntry type with key and value expressions.
MapKind represents a map literal expression.
SelectKind represents a field selection expression.
StructFieldKind indicates that the entry is a StructField with a field name and initializer expression.
StructKind represents a struct literal expression.
UnspecifiedEntryExprKind indicates that the entry expr is not set.
UnspecifiedExprKind represents an unset expression with no specified properties.

# Structs

AST contains a protobuf expression and source info along with CEL-native type and reference information.
OffsetRange captures the start and stop positions of a section of text in the input expression.
ReferenceInfo contains a CEL native representation of an identifier reference which may refer to either a qualified identifier name, a set of overload ids, or a constant value from an enum.
SourceInfo records basic information about the expression as a textual input and as a parsed expression value.

# Interfaces

CallExpr defines an interface for inspecting a function call and its arguments.
ComprehensionExpr defines an interface for inspecting a comprehension expression.
EntryExpr represents the base entry expression in a CEL map or struct literal.
Expr represents the base expression node in a CEL abstract syntax tree.
ExprFactory interfaces defines a set of methods necessary for building native expression values.
ListExpr defines an interface for inspecting a list literal expression.
MapEntry defines an interface for inspecting a map entry.
MapExpr defines an interface for inspecting a map expression.
NavigableExpr represents the base navigable expression value with methods to inspect the parent and child expressions.
SelectExpr defines an interface for inspecting a select expression.
StructExpr defines an interfaces for inspecting a struct and its field initializers.
StructField defines an interface for inspecting a struct field initialization.
Visitor defines an object for visiting Expr and EntryExpr nodes within an expression graph.

# Type aliases

EntryExprKind represents the possible EntryExpr kinds.
ExprKind represents the expression node kind.
ExprMatcher takes a NavigableExpr in and indicates whether the value is a match.
IDGenerator produces unique ids suitable for tagging expression nodes.