refactor: separate backend domains and storage adapters

This commit is contained in:
2026-08-14 01:37:56 +08:00
parent e6775f0966
commit 8c4c6ba661
102 changed files with 6644 additions and 5735 deletions
+30
View File
@@ -0,0 +1,30 @@
package router
import (
"kra/internal/server/handler"
"github.com/gin-gonic/gin"
)
func RegisterUser(group *gin.RouterGroup, handler *handler.User) {
user := group.Group("/user")
user.POST("/getUserList", handler.List)
user.POST("/admin_register", handler.Create)
user.PUT("/setUserInfo", handler.Update)
user.PUT("/setSelfInfo", handler.UpdateSelf)
user.DELETE("/deleteUser", handler.Delete)
user.POST("/resetPassword", handler.ResetPassword)
user.POST("/changePassword", handler.ChangePassword)
user.PUT("/setSelfSetting", handler.SetSelfSetting)
user.POST("/setUserAuthorities", handler.SetAuthorities)
user.POST("/setUserAuthority", handler.SwitchAuthority)
user.GET("/getUserInfo", handler.Get)
}
func RegisterNavigation(group *gin.RouterGroup, handler *handler.Navigation) {
group.Group("/menu").POST("/getMenu", handler.Menu)
}
func RegisterSession(group *gin.RouterGroup, handler *handler.Session) {
group.Group("/jwt").POST("/jsonInBlacklist", handler.Logout)
}