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

Function ExprValueAsAlphaProto

cel/io.go:161–169  ·  view source on GitHub ↗

ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue. The result ExprValue is the serialized proto form.

(res ref.Val)

Source from the content-addressed store, hash-verified

159// ExprValueAsAlphaProto converts between ref.Val and google.api.expr.v1alpha1.ExprValue.
160// The result ExprValue is the serialized proto form.
161func ExprValueAsAlphaProto(res ref.Val) (*exprpb.ExprValue, error) {
162 canonical, err := ExprValueAsProto(res)
163 if err != nil {
164 return nil, err
165 }
166 alpha := &exprpb.ExprValue{}
167 err = convertProto(canonical, alpha)
168 return alpha, err
169}
170
171// ExprValueAsProto converts between ref.Val and cel.expr.ExprValue.
172// The result ExprValue is the serialized proto form.

Callers 2

RefValToExprValueFunction · 0.85

Calls 2

ExprValueAsProtoFunction · 0.85
convertProtoFunction · 0.70

Tested by 1