!134 feat: 新增支持es和连接池

* feat: 各连接,支持连接池
* feat:支持es
This commit is contained in:
zongyangleo
2025-05-21 04:42:30 +00:00
committed by Coder慌
parent f676ec9e7b
commit 142bbd265d
89 changed files with 5734 additions and 575 deletions

View File

@@ -43,6 +43,9 @@ func NewPut(path string, handler HandlerFunc) *Conf {
func NewDelete(path string, handler HandlerFunc) *Conf {
return New("DELETE", path, handler)
}
func NewAny(path string, handler HandlerFunc) *Conf {
return New("any", path, handler)
}
func (r *Conf) ToGinHFunc() gin.HandlerFunc {
return func(c *gin.Context) {
@@ -82,7 +85,11 @@ func (r *Conf) NoRes() *Conf {
// 注册至group
func (r *Conf) Group(gr *gin.RouterGroup) *Conf {
gr.Handle(r.method, r.path, r.ToGinHFunc())
if r.method == "any" {
gr.Any(r.path, r.ToGinHFunc())
} else {
gr.Handle(r.method, r.path, r.ToGinHFunc())
}
return r
}