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)
| 141 | // ValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.Value. |
| 142 | // The result Value is the serialized proto form. The ref.Val must not be error or unknown. |
| 143 | func ValueAsAlphaProto(res ref.Val) (*exprpb.Value, error) { |
| 144 | canonical, err := ValueAsProto(res) |
| 145 | if err != nil { |
| 146 | return nil, err |
| 147 | } |
| 148 | alpha := &exprpb.Value{} |
| 149 | err = convertProto(canonical, alpha) |
| 150 | return alpha, err |
| 151 | } |
| 152 | |
| 153 | // RefValToExprValue converts between ref.Val and google.api.expr.v1alpha1.ExprValue. |
| 154 | // The result ExprValue is the serialized proto form. |
no test coverage detected