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

Function ExampleInterceptorsFiles

codegen/service/example_interceptors.go:14–22  ·  view source on GitHub ↗

ExampleInterceptorsFiles returns the files for the example server and client interceptors.

(genpkg string, r *expr.RootExpr, services *ServicesData)

Source from the content-addressed store, hash-verified

12
13// ExampleInterceptorsFiles returns the files for the example server and client interceptors.
14func ExampleInterceptorsFiles(genpkg string, r *expr.RootExpr, services *ServicesData) []*codegen.File {
15 var fw []*codegen.File
16 for _, svc := range r.Services {
17 if f := exampleInterceptorsFile(genpkg, svc, services); f != nil {
18 fw = append(fw, f...)
19 }
20 }
21 return fw
22}
23
24// exampleInterceptorsFile returns the example interceptors for the given service.
25func exampleInterceptorsFile(genpkg string, svc *expr.ServiceExpr, services *ServicesData) []*codegen.File {

Callers 2

ExampleFunction · 0.92

Calls 1

exampleInterceptorsFileFunction · 0.85

Tested by 1