refactor: reorganize modules and add Linux build tooling
This commit is contained in:
29
module/base/logs/internal/routers/register.go
Normal file
29
module/base/logs/internal/routers/register.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package routers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"bsm/full/module/base/logs/internal/logic/hello"
|
||||
"bsm/full/module/base/logs/internal/logic/log"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Register(srvKey string, engine *gin.Engine) {
|
||||
v1_key := fmt.Sprintf("/%s/%s", srvKey, "v1")
|
||||
registerAnonymous(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.Use(middleware.JwtAuth(impl.RedisCache))
|
||||
anonymous.GET("/ping", hello.Ping)
|
||||
anonymous.POST("/create", log.Create)
|
||||
anonymous.POST("/fetch", log.LogFetch)
|
||||
anonymous.POST("/total", log.Total)
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user