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

Function ServerTypeFiles

grpc/codegen/server_types.go:13–19  ·  view source on GitHub ↗

ServerTypeFiles returns the server types files containing all the server interfaces and types needed to implement gRPC server.

(genpkg string, services *ServicesData)

Source from the content-addressed store, hash-verified

11// ServerTypeFiles returns the server types files containing all the server
12// interfaces and types needed to implement gRPC server.
13func ServerTypeFiles(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] = serverType(genpkg, svc, services)
17 }
18 return fw
19}
20
21// serverType returns the file defining the gRPC server types.
22func serverType(genpkg string, svc *expr.GRPCServiceExpr, services *ServicesData) *codegen.File {

Callers 1

TestServerTypeFilesFunction · 0.70

Calls 1

serverTypeFunction · 0.70

Tested by 1

TestServerTypeFilesFunction · 0.56