ValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.Value. The result Value is the serialized proto form. The ref.Val must not be error or unknown.
(res ref.Val)
| 117 | // ValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.Value. |
| 118 | // The result Value is the serialized proto form. The ref.Val must not be error or unknown. |
| 119 | func ValueAsAlphaProto(res ref.Val) (*exprpb.Value, error) { |
| 120 | canonical, err := ValueAsProto(res) |
| 121 | if err != nil { |
| 122 | return nil, err |
| 123 | } |
| 124 | alpha := &exprpb.Value{} |
| 125 | err = convertProto(canonical, alpha) |
| 126 | return alpha, err |
| 127 | } |
| 128 | |
| 129 | // RefValToExprValue converts between ref.Val and google.api.expr.v1alpha1.ExprValue. |
| 130 | // The result ExprValue is the serialized proto form. |
no test coverage detected