MCPcopy Create free account
hub / github.com/cel-expr/cel-go / ProtoToExpr

Function ProtoToExpr

common/ast/conversion.go:108–111  ·  view source on GitHub ↗

ProtoToExpr converts a protobuf Expr value to an ast.Expr value.

(e *exprpb.Expr)

Source from the content-addressed store, hash-verified

106
107// ProtoToExpr converts a protobuf Expr value to an ast.Expr value.
108func ProtoToExpr(e *exprpb.Expr) (Expr, error) {
109 factory := NewExprFactory()
110 return exprInternal(factory, e)
111}
112
113// ProtoToEntryExpr converts a protobuf struct/map entry to an ast.EntryExpr
114func ProtoToEntryExpr(e *exprpb.Expr_CreateStruct_Entry) (EntryExpr, error) {

Callers 7

TestUnparseErrorsFunction · 0.92
adaptToExprFunction · 0.92
TestASTNilSafetyFunction · 0.92
TestConvertExprFunction · 0.92
ToASTFunction · 0.85
ProtoToSourceInfoFunction · 0.85

Calls 2

NewExprFactoryFunction · 0.85
exprInternalFunction · 0.85

Tested by 3

TestUnparseErrorsFunction · 0.74
TestASTNilSafetyFunction · 0.74
TestConvertExprFunction · 0.74