ClientTypeFiles returns the client types files containing all the client interfaces and types needed to implement gRPC client.
(genpkg string, services *ServicesData)
| 11 | // ClientTypeFiles returns the client types files containing all the client |
| 12 | // interfaces and types needed to implement gRPC client. |
| 13 | func ClientTypeFiles(genpkg string, services *ServicesData) []*codegen.File { |
| 14 | fw := make([]*codegen.File, len(services.Root.API.GRPC.Services)) |
| 15 | for i, svc := range services.Root.API.GRPC.Services { |
| 16 | fw[i] = clientType(genpkg, svc, services) |
| 17 | } |
| 18 | return fw |
| 19 | } |
| 20 | |
| 21 | // clientType returns the file defining the gRPC client types. |
| 22 | func clientType(genpkg string, svc *expr.GRPCServiceExpr, services *ServicesData) *codegen.File { |