增加CustomContext

This commit is contained in:
2025-04-12 21:01:59 +08:00
parent 53ecd0c267
commit 91a1d34474
11 changed files with 138 additions and 278 deletions

View File

@ -8,10 +8,11 @@
package router
import (
"strings"
apiDocDefine "git.zhangdeman.cn/gateway/api-doc/define"
"git.zhangdeman.cn/zhangdeman/gin/middleware"
"github.com/gin-gonic/gin"
"strings"
)
type SetServerOptionFunc func(so *serverOption)
@ -29,7 +30,6 @@ type serverOption struct {
serverInfo *apiDocDefine.Info // 服务器信息
serverList []*apiDocDefine.ServerItem // 服务器环境列表
enablePprof bool // 启用pprof
enableRequestInit bool // 初始化请求,生成trace_id 设置请求时间等
enableCors bool // 启动跨域支持
loggerCfg *middleware.AccessConfig // 日志配置
}