router.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. )
  91. web.AddNamespace(ns)
  92. }