MCPcopy Create free account
hub / github.com/goadesign/goa / ProtoFiles

Function ProtoFiles

grpc/codegen/proto.go:23–29  ·  view source on GitHub ↗

ProtoFiles returns the protobuf file for every gRPC service.

(genpkg string, services *ServicesData)

Source from the content-addressed store, hash-verified

21
22// ProtoFiles returns the protobuf file for every gRPC service.
23func ProtoFiles(genpkg string, services *ServicesData) []*codegen.File {
24 fw := make([]*codegen.File, len(services.Root.API.GRPC.Services))
25 for i, svc := range services.Root.API.GRPC.Services {
26 fw[i] = protoFile(genpkg, svc, services)
27 }
28 return fw
29}
30
31// protoFile returns the protobuf file defining the specified service.
32func protoFile(genpkg string, svc *expr.GRPCServiceExpr, services *ServicesData) *codegen.File {

Callers 3

TestProtoFilesFunction · 0.85
TestMessageDefSectionFunction · 0.85

Calls 1

protoFileFunction · 0.85

Tested by 3

TestProtoFilesFunction · 0.68
TestMessageDefSectionFunction · 0.68