hotgo/server/internal/service/middleware.go

41 lines
967 B
Go

// ================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
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)
Addon(r *ghttp.Request)
Blacklist(r *ghttp.Request)
Develop(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
}