ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue. The result ExprValue is the serialized proto form.
(res ref.Val)
| 159 | // ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue. |
| 160 | // The result ExprValue is the serialized proto form. |
| 161 | func ExprValueAsAlphaProto(res ref.Val) (*exprpb.ExprValue, error) { |
| 162 | canonical, err := ExprValueAsProto(res) |
| 163 | if err != nil { |
| 164 | return nil, err |
| 165 | } |
| 166 | alpha := &exprpb.ExprValue{} |
| 167 | err = convertProto(canonical, alpha) |
| 168 | return alpha, err |
| 169 | } |
| 170 | |
| 171 | // ExprValueAsProto converts between ref.Val and cel.expr.ExprValue. |
| 172 | // The result ExprValue is the serialized proto form. |