ExampleServerFiles returns an example gRPC server implementation.
(genpkg string, services *ServicesData)
| 13 | |
| 14 | // ExampleServerFiles returns an example gRPC server implementation. |
| 15 | func ExampleServerFiles(genpkg string, services *ServicesData) []*codegen.File { |
| 16 | var fw []*codegen.File |
| 17 | for _, svr := range services.Root.API.Servers { |
| 18 | if m := exampleServer(genpkg, services, svr); m != nil { |
| 19 | fw = append(fw, m) |
| 20 | } |
| 21 | } |
| 22 | return fw |
| 23 | } |
| 24 | |
| 25 | // exampleServer returns an example gRPC server implementation. |
| 26 | func exampleServer(genpkg string, services *ServicesData, svr *expr.ServerExpr) *codegen.File { |