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

Function AlphaProtoAsDeclaration

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

402
403// AlphaProtoAsDeclaration converts a v1alpha1.Decl value describing a variable or function into an EnvOption.
404func AlphaProtoAsDeclaration(d *exprpb.Decl) (EnvOption, error) {
405 canonical := &celpb.Decl{}
406 if err := convertProto(d, canonical); err != nil {
407 return nil, err
408 }
409 return ProtoAsDeclaration(canonical)
410}
411
412// ProtoAsDeclaration converts a canonical celpb.Decl value describing a variable or function into an EnvOption.
413func 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