Router router
(ctx *common.Context)
| 26 | |
| 27 | //Router router |
| 28 | func (h *API) Router(ctx *common.Context) { |
| 29 | |
| 30 | ctx.SetAPIID(h.apiID) |
| 31 | ctx.LogFields[access_field.API] = fmt.Sprintf("\"%d %s\"", h.apiID, h.apiName) |
| 32 | |
| 33 | isAccess := h.accessFlow(ctx) |
| 34 | h.accessGlobalFlow(ctx) |
| 35 | if !isAccess { |
| 36 | return |
| 37 | } |
| 38 | |
| 39 | h.app.Execute(ctx) |
| 40 | |
| 41 | isproxy := h.proxyFlow(ctx) |
| 42 | h.proxyGlobalFlow(ctx) |
| 43 | |
| 44 | if !isproxy { |
| 45 | return |
| 46 | } |
| 47 | |
| 48 | return |
| 49 | } |
| 50 | |
| 51 | func (h *API) accessFlow(ctx *common.Context) bool { |
| 52 | for _, handler := range h.pluginAccess { |
nothing calls this directly
no test coverage detected