mirror of
https://github.com/telanflow/mps.git
synced 2025-10-04 07:56:27 +08:00
14 lines
323 B
Go
14 lines
323 B
Go
package mps
|
|
|
|
import "net/http"
|
|
|
|
type Middleware interface {
|
|
Handle(req *http.Request, ctx *Context) (*http.Response, error)
|
|
}
|
|
|
|
type MiddlewareFunc func(req *http.Request, ctx *Context) (*http.Response, error)
|
|
|
|
func (f MiddlewareFunc) Handle(req *http.Request, ctx *Context) (*http.Response, error) {
|
|
return f(req, ctx)
|
|
}
|