router.go 741 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * @desc:路由绑定
  3. * @company:云南奇讯科技有限公司
  4. * @Author: yixiaohu
  5. * @Date: 2022/2/18 16:23
  6. */
  7. package router
  8. import (
  9. "github.com/gogf/gf/v2/net/ghttp"
  10. commonRouter "github.com/tiger1103/gfast/v3/internal/app/common/router"
  11. demoRouter "github.com/tiger1103/gfast/v3/internal/app/demo/router"
  12. systemRouter "github.com/tiger1103/gfast/v3/internal/app/system/router"
  13. )
  14. func BindController(group *ghttp.RouterGroup) {
  15. group.Group("/api/v1", func(group *ghttp.RouterGroup) {
  16. group.Middleware(ghttp.MiddlewareHandlerResponse)
  17. // 绑定后台路由
  18. systemRouter.BindController(group)
  19. // 绑定测试路由
  20. demoRouter.BindController(group)
  21. // 绑定公共路由
  22. commonRouter.BindController(group)
  23. })
  24. }