ProtoFiles returns the protobuf file for every gRPC service.
(genpkg string, services *ServicesData)
| 21 | |
| 22 | // ProtoFiles returns the protobuf file for every gRPC service. |
| 23 | func 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. |
| 32 | func protoFile(genpkg string, svc *expr.GRPCServiceExpr, services *ServicesData) *codegen.File { |