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

Function ExampleServerFiles

jsonrpc/codegen/example_server.go:15–23  ·  view source on GitHub ↗

ExampleServerFiles returns example JSON-RPC server implementation.

(genpkg string, data *httpcodegen.ServicesData, files []*codegen.File)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

exampleServerFunction · 0.70

Tested by

no test coverage detected