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

Function AlphaProtoAsDeclaration

cel/decls.go:378–384  ·  view source on GitHub ↗

AlphaProtoAsDeclaration converts a v1alpha1.Decl value describing a variable or function into an EnvOption.

(d *exprpb.Decl)

Source from the content-addressed store, hash-verified

376
377// AlphaProtoAsDeclaration converts a v1alpha1.Decl value describing a variable or function into an EnvOption.
378func AlphaProtoAsDeclaration(d *exprpb.Decl) (EnvOption, error) {
379 canonical := &celpb.Decl{}
380 if err := convertProto(d, canonical); err != nil {
381 return nil, err
382 }
383 return ProtoAsDeclaration(canonical)
384}
385
386// ProtoAsDeclaration converts a canonical celpb.Decl value describing a variable or function into an EnvOption.
387func ProtoAsDeclaration(d *celpb.Decl) (EnvOption, error) {

Callers 1

ExprDeclToDeclarationFunction · 0.85

Calls 2

ProtoAsDeclarationFunction · 0.85
convertProtoFunction · 0.70

Tested by

no test coverage detected