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

Function ExprValueAsAlphaProto

cel/io.go:137–145  ·  view source on GitHub ↗

ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue. The result ExprValue is the serialized proto form.

(res ref.Val)

Source from the content-addressed store, hash-verified

135// ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue.
136// The result ExprValue is the serialized proto form.
137func ExprValueAsAlphaProto(res ref.Val) (*exprpb.ExprValue, error) {
138 canonical, err := ExprValueAsProto(res)
139 if err != nil {
140 return nil, err
141 }
142 alpha := &exprpb.ExprValue{}
143 err = convertProto(canonical, alpha)
144 return alpha, err
145}
146
147// ExprValueAsProto converts between ref.Val and cel.expr.ExprValue.
148// The result ExprValue is the serialized proto form.

Callers 2

RefValToExprValueFunction · 0.85

Calls 2

ExprValueAsProtoFunction · 0.85
convertProtoFunction · 0.70

Tested by 1