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

Method validateInterceptors

expr/method.go:274–285  ·  view source on GitHub ↗

validateInterceptors validates the method interceptors.

()

Source from the content-addressed store, hash-verified

272
273// validateInterceptors validates the method interceptors.
274func (m *MethodExpr) validateInterceptors() *eval.ValidationErrors {
275 verr := new(eval.ValidationErrors)
276 m.ClientInterceptors = mergeInterceptors(m.ClientInterceptors, m.Service.ClientInterceptors, Root.API.ClientInterceptors)
277 for _, i := range m.ClientInterceptors {
278 verr.Merge(i.validate(m))
279 }
280 m.ServerInterceptors = mergeInterceptors(m.ServerInterceptors, m.Service.ServerInterceptors, Root.API.ServerInterceptors)
281 for _, i := range m.ServerInterceptors {
282 verr.Merge(i.validate(m))
283 }
284 return verr
285}
286
287// mergeInterceptors merges interceptors from different levels (method, service, API)
288// while avoiding duplicates. The order of precedence is: method > service > API.

Callers 1

ValidateMethod · 0.95

Calls 3

mergeInterceptorsFunction · 0.85
validateMethod · 0.80
MergeMethod · 0.45

Tested by

no test coverage detected