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

Function hasEndpointStruct

codegen/service/interceptors.go:231–238  ·  view source on GitHub ↗

hasEndpointStruct returns a function that returns true if the method has an endpoint struct if server is true, otherwise it returns false.

(server bool)

Source from the content-addressed store, hash-verified

229// hasEndpointStruct returns a function that returns true if the method has an endpoint struct
230// if server is true, otherwise it returns false.
231func hasEndpointStruct(server bool) func(*MethodInterceptorData) bool {
232 if !server {
233 return func(*MethodInterceptorData) bool { return false }
234 }
235 return func(m *MethodInterceptorData) bool {
236 return m.ServerStream != nil && m.ServerStream.EndpointStruct != ""
237 }
238}
239
240// collectWrappedStreams returns a slice of streams to be wrapped by interceptor wrapper functions.
241func collectWrappedStreams(interceptors []*InterceptorData, server bool) []*StreamInterceptorData {

Callers 1

interceptorFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected