router.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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_report/controllers"
  11. "github.com/beego/beego/v2/server/web"
  12. )
  13. func init() {
  14. ns := web.NewNamespace("/api",
  15. web.NSNamespace("/report",
  16. web.NSInclude(
  17. &controllers.ReportShareController{},
  18. ),
  19. ),
  20. web.NSNamespace("/wechat",
  21. web.NSInclude(
  22. &controllers.WechatCommonController{},
  23. ),
  24. ),
  25. web.NSNamespace("/english_report",
  26. web.NSInclude(
  27. &controllers.EnglishReportShareController{},
  28. ),
  29. ),
  30. web.NSNamespace("/smart_report",
  31. web.NSInclude(
  32. &controllers.SmartReportController{},
  33. ),
  34. ),
  35. web.NSNamespace("/excel",
  36. web.NSInclude(
  37. &controllers.ExcelController{},
  38. ),
  39. ),
  40. web.NSNamespace("/chart",
  41. web.NSInclude(
  42. &controllers.ChartController{},
  43. ),
  44. ),
  45. web.NSNamespace("/eta_forum",
  46. web.NSInclude(
  47. &controllers.EtaForumChartController{},
  48. ),
  49. ),
  50. )
  51. web.AddNamespace(ns)
  52. }