| 106 | } |
| 107 | |
| 108 | type Controller struct { |
| 109 | ControllerDeps |
| 110 | |
| 111 | path string |
| 112 | request *http.Request |
| 113 | response http.ResponseWriter |
| 114 | |
| 115 | // preHandler will be executed before any handler executed |
| 116 | preHandler func(ctx context.Context) error |
| 117 | getHandler func(ctx context.Context) error |
| 118 | postHandlers map[string]func(ctx context.Context) error |
| 119 | |
| 120 | skipRewind bool |
| 121 | } |
| 122 | |
| 123 | func (c *Controller) RequireUserID(ctx context.Context) string { |
| 124 | userID := session.GetUserID(ctx) |
nothing calls this directly
no outgoing calls
no test coverage detected