chore: 并入 iotlcm-openapi 历史到 openapi/(原提交 3b05d5a)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:02 +08:00
484 changed files with 34732 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
package service
import (
"context"
"github.com/gogf/gf/v2/net/ghttp"
)
type (
IMiddleware interface {
ResponseHandler(r *ghttp.Request)
ApiCtx(r *ghttp.Request)
ApiAuth(r *ghttp.Request)
OldResponseHandler(r *ghttp.Request)
OldCtx(r *ghttp.Request)
OldAuth(r *ghttp.Request)
IsExceptLogin(ctx context.Context, path string) bool
}
)
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
}