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

Function AlphaProtoAsDeclaration

cel/decls.go:411–417  ·  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

409
410// AlphaProtoAsDeclaration converts a v1alpha1.Decl value describing a variable or function into an EnvOption.
411func AlphaProtoAsDeclaration(d *exprpb.Decl) (EnvOption, error) {
412 canonical := &celpb.Decl{}
413 if err := convertProto(d, canonical); err != nil {
414 return nil, err
415 }
416 return ProtoAsDeclaration(canonical)
417}
418
419// ProtoAsDeclaration converts a canonical celpb.Decl value describing a variable or function into an EnvOption.
420func 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