Initial commit

This commit is contained in:
yanweidong
2026-02-09 17:36:20 +08:00
commit 96b79a34ef
28 changed files with 2736 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package routers
import (
"fmt"
"git.apinb.com/dataset/stock/internal/logic/hello"
"github.com/gin-gonic/gin"
)
// 完成请求地址: ip:port/srvKey/v1/group/xxx
func Register(srvKey string, engine *gin.Engine) {
v1_key := fmt.Sprintf("/%s/%s", srvKey, "v1")
registerAnonymous(v1_key, engine)
registerRouters(v1_key, engine)
}
// registerAnonymous 不需要auth的接口
func registerAnonymous(v1_key string, engine *gin.Engine) {
// Anonymous router.
fmt.Println(v1_key)
anonymous := engine.Group(v1_key)
{
anonymous.GET("/ping", hello.Ping)
}
}
func registerRouters(v1_key string, engine *gin.Engine) {
}