MCPcopy Create free account
hub / github.com/cel-expr/cel-go / AlphaProtoAsValue

Function AlphaProtoAsValue

cel/io.go:273–279  ·  view source on GitHub ↗

AlphaProtoAsValue converts between google.api.expr.v1alpha1.Value and ref.Val.

(adapter types.Adapter, v *exprpb.Value)

Source from the content-addressed store, hash-verified

271
272// AlphaProtoAsValue converts between google.api.expr.v1alpha1.Value and ref.Val.
273func 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.
282func ProtoAsValue(adapter types.Adapter, v *celpb.Value) (ref.Val, error) {

Callers 1

ValueToRefValueFunction · 0.85

Calls 2

ProtoAsValueFunction · 0.85
convertProtoFunction · 0.70

Tested by

no test coverage detected