AlphaProtoAsValue converts between google.api.expr.v1alpha1.Value and ref.Val.
(adapter types.Adapter, v *exprpb.Value)
| 271 | |
| 272 | // AlphaProtoAsValue converts between google.api.expr.v1alpha1.Value and ref.Val. |
| 273 | func AlphaProtoAsValue(adapter types.Adapter, v *exprpb.Value) (ref.Val, error) { |
| 274 | canonical := &celpb.Value{} |
| 275 | if err := convertProto(v, canonical); err != nil { |
| 276 | return nil, err |
| 277 | } |
| 278 | return ProtoAsValue(adapter, canonical) |
| 279 | } |
| 280 | |
| 281 | // ProtoAsValue converts between cel.expr.Value and ref.Val. |
| 282 | func ProtoAsValue(adapter types.Adapter, v *celpb.Value) (ref.Val, error) { |
no test coverage detected