router.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. // @APIVersion 1.0.0
  2. // @Title beego Test API
  3. // @Description beego has a very cool tools to autogenerate documents for your API
  4. // @Contact astaxie@gmail.com
  5. // @TermsOfServiceUrl http://beego.me/
  6. // @License Apache 2.0
  7. // @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
  8. package routers
  9. import (
  10. "eta/eta_forum_admin/controllers"
  11. "eta/eta_forum_admin/controllers/eta_business"
  12. "eta/eta_forum_admin/controllers/eta_training_video"
  13. "eta/eta_forum_admin/controllers/help_doc"
  14. "github.com/beego/beego/v2/server/web"
  15. )
  16. func init() {
  17. ns := web.NewNamespace("/v1",
  18. web.NSNamespace("/chart",
  19. web.NSInclude(
  20. &controllers.ChartInfoController{},
  21. &controllers.ChartClassifyController{},
  22. ),
  23. ),
  24. web.NSNamespace("/edb",
  25. web.NSInclude(
  26. &controllers.EdbInfoController{},
  27. ),
  28. ),
  29. web.NSNamespace("/login",
  30. web.NSInclude(
  31. &controllers.LoginController{},
  32. ),
  33. ),
  34. web.NSNamespace("/admin",
  35. web.NSInclude(
  36. &controllers.AdminController{},
  37. ),
  38. ),
  39. web.NSNamespace("/system",
  40. web.NSInclude(
  41. &controllers.SysRoleController{},
  42. &controllers.SysMenuController{},
  43. ),
  44. ),
  45. web.NSNamespace("/eta_business",
  46. web.NSInclude(
  47. &eta_business.EtaBusinessController{},
  48. &eta_business.EtaBusinessMenuController{},
  49. &eta_business.EtaBusinessUserController{},
  50. ),
  51. ),
  52. web.NSNamespace("/eta_trial",
  53. web.NSInclude(
  54. &controllers.ETATrialController{},
  55. ),
  56. ),
  57. web.NSNamespace("/eta_version_update_log",
  58. web.NSInclude(
  59. &controllers.EtaVersionUpdateLogController{},
  60. ),
  61. ),
  62. web.NSNamespace("/help_doc",
  63. web.NSInclude(
  64. &help_doc.HelpDocClassifyController{},
  65. &help_doc.HelpDocController{},
  66. ),
  67. ),
  68. web.NSNamespace("/chart_collect",
  69. web.NSInclude(
  70. &controllers.ChartCollectStatController{},
  71. ),
  72. ),
  73. web.NSNamespace("/resource",
  74. web.NSInclude(
  75. &controllers.ResourceController{},
  76. ),
  77. ),
  78. web.NSNamespace("/config",
  79. web.NSInclude(
  80. &controllers.CrmConfigController{},
  81. ),
  82. ),
  83. web.NSNamespace("/eta_training_video",
  84. web.NSInclude(
  85. &eta_training_video.EtaTrainingVideoController{},
  86. &eta_training_video.EtaTrainingVideoClassifyController{},
  87. &eta_training_video.EtaTrainingVideoTagController{},
  88. ),
  89. ),
  90. web.NSNamespace("/custom",
  91. web.NSInclude(
  92. &controllers.CompanyIndustryController{},
  93. &controllers.CompanySellerController{},
  94. ),
  95. ),
  96. )
  97. web.AddNamespace(ns)
  98. }