2022-12-11 20:48:18 +08:00
|
|
|
// ================================================================================
|
2022-11-24 23:37:34 +08:00
|
|
|
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
2022-12-11 20:48:18 +08:00
|
|
|
// You can delete these comments if you wish manually maintain this interface file.
|
|
|
|
// ================================================================================
|
2022-11-24 23:37:34 +08:00
|
|
|
|
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
|
|
)
|
|
|
|
|
2022-12-11 20:48:18 +08:00
|
|
|
type (
|
|
|
|
IMiddleware interface {
|
|
|
|
AdminAuth(r *ghttp.Request)
|
|
|
|
ApiAuth(r *ghttp.Request)
|
|
|
|
Ctx(r *ghttp.Request)
|
|
|
|
CORS(r *ghttp.Request)
|
|
|
|
DemoLimit(r *ghttp.Request)
|
2023-02-23 17:53:04 +08:00
|
|
|
Addon(r *ghttp.Request)
|
2023-01-25 11:49:21 +08:00
|
|
|
Blacklist(r *ghttp.Request)
|
2023-02-08 20:29:34 +08:00
|
|
|
Develop(r *ghttp.Request)
|
2022-12-11 20:48:18 +08:00
|
|
|
ResponseHandler(r *ghttp.Request)
|
2023-05-12 16:20:22 +08:00
|
|
|
WebSocketAuth(r *ghttp.Request)
|
2022-12-11 20:48:18 +08:00
|
|
|
}
|
|
|
|
)
|
2022-11-24 23:37:34 +08:00
|
|
|
|
2022-12-11 20:48:18 +08:00
|
|
|
var (
|
|
|
|
localMiddleware IMiddleware
|
|
|
|
)
|
2022-11-24 23:37:34 +08:00
|
|
|
|
|
|
|
func Middleware() IMiddleware {
|
|
|
|
if localMiddleware == nil {
|
|
|
|
panic("implement not found for interface IMiddleware, forgot register?")
|
|
|
|
}
|
|
|
|
return localMiddleware
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterMiddleware(i IMiddleware) {
|
|
|
|
localMiddleware = i
|
|
|
|
}
|