added the Middleware interface
the middleware interface helps with middleware that requires to have backgroundtasks or open connections.
Dieser Commit ist enthalten in:
Ursprung
c3305139d4
Commit
dcabcdff25
|
@ -47,3 +47,9 @@ func RequireUser(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Middleware is an type to Save data between executions and to provide help at the teardown.
|
||||
type Middleware interface {
|
||||
Gin(*gin.Context)
|
||||
Teardown()
|
||||
}
|
||||
|
|
Laden…
In neuem Issue referenzieren