mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-12 04:53:47 +08:00
v2.0
This commit is contained in:
32
server/internal/service/middleware.go
Normal file
32
server/internal/service/middleware.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// ==========================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
type IMiddleware interface {
|
||||
AdminAuth(r *ghttp.Request)
|
||||
ApiAuth(r *ghttp.Request)
|
||||
Ctx(r *ghttp.Request)
|
||||
CORS(r *ghttp.Request)
|
||||
DemoLimit(r *ghttp.Request)
|
||||
ResponseHandler(r *ghttp.Request)
|
||||
WebSocketToken(r *ghttp.Request)
|
||||
}
|
||||
|
||||
var localMiddleware IMiddleware
|
||||
|
||||
func Middleware() IMiddleware {
|
||||
if localMiddleware == nil {
|
||||
panic("implement not found for interface IMiddleware, forgot register?")
|
||||
}
|
||||
return localMiddleware
|
||||
}
|
||||
|
||||
func RegisterMiddleware(i IMiddleware) {
|
||||
localMiddleware = i
|
||||
}
|
Reference in New Issue
Block a user