AlphaProtoAsValue converts between google.api.expr.v1alpha1.Value and ref.Val.
(adapter types.Adapter, v *exprpb.Value)
| 295 | |
| 296 | // AlphaProtoAsValue converts between google.api.expr.v1alpha1.Value and ref.Val. |
| 297 | func AlphaProtoAsValue(adapter types.Adapter, v *exprpb.Value) (ref.Val, error) { |
| 298 | canonical := &celpb.Value{} |
| 299 | if err := convertProto(v, canonical); err != nil { |
| 300 | return nil, err |
| 301 | } |
| 302 | return ProtoAsValue(adapter, canonical) |
| 303 | } |
| 304 | |
| 305 | // ProtoAsValue converts between cel.expr.Value and ref.Val. |
| 306 | func ProtoAsValue(adapter types.Adapter, v *celpb.Value) (ref.Val, error) { |
no test coverage detected