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

Function ClientFiles

http/codegen/client.go:13–30  ·  view source on GitHub ↗

ClientFiles returns the generated HTTP client files.

(genpkg string, data *ServicesData)

Source from the content-addressed store, hash-verified

11
12// ClientFiles returns the generated HTTP client files.
13func ClientFiles(genpkg string, data *ServicesData) []*codegen.File {
14 files := make([]*codegen.File, 0, len(data.Expressions.Services)*3) // preallocate for client files
15 for _, svc := range data.Expressions.Services {
16 files = append(files, clientFile(genpkg, svc, data))
17 if f := WebsocketClientFile(genpkg, svc, data); f != nil {
18 files = append(files, f)
19 }
20 if f := sseClientFile(genpkg, svc, data); f != nil {
21 files = append(files, f)
22 }
23 }
24 for _, svc := range data.Expressions.Services {
25 if f := ClientEncodeDecodeFile(genpkg, svc, data); f != nil {
26 files = append(files, f)
27 }
28 }
29 return files
30}
31
32// ClientEncodeDecodeFile returns the file containing the HTTP client encoding
33// and decoding logic.

Callers 12

TestClientDecodeFunction · 0.70
TestCookieAPIKeySecurityFunction · 0.70
renderClientDecodeCodeFunction · 0.70
TestClientEncodeFunction · 0.70
TestClientBuildRequestFunction · 0.70
TestClientInitFunction · 0.70
TestClientStreamingFunction · 0.70
TestSSE_MixedResultsFunction · 0.70
TestWebSocketGoldenFilesFunction · 0.70

Calls 4

WebsocketClientFileFunction · 0.85
ClientEncodeDecodeFileFunction · 0.85
clientFileFunction · 0.70
sseClientFileFunction · 0.70

Tested by 12

TestClientDecodeFunction · 0.56
TestCookieAPIKeySecurityFunction · 0.56
renderClientDecodeCodeFunction · 0.56
TestClientEncodeFunction · 0.56
TestClientBuildRequestFunction · 0.56
TestClientInitFunction · 0.56
TestClientStreamingFunction · 0.56
TestSSE_MixedResultsFunction · 0.56
TestWebSocketGoldenFilesFunction · 0.56