ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue. The result ExprValue is the serialized proto form.
(res ref.Val)
| 135 | // ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue. |
| 136 | // The result ExprValue is the serialized proto form. |
| 137 | func 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. |