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

Function AlphaProtoAsValue

cel/io.go:297–303  ·  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

295
296// AlphaProtoAsValue converts between google.api.expr.v1alpha1.Value and ref.Val.
297func 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.
306func 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