router.go 953 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_chart_lib/controllers"
  11. "github.com/beego/beego/v2/server/web"
  12. )
  13. func init() {
  14. ns := web.NewNamespace("/v1",
  15. web.NSNamespace("/chart",
  16. web.NSInclude(
  17. &controllers.ChartController{},
  18. ),
  19. ),
  20. web.NSNamespace("/chart_auth",
  21. web.NSInclude(
  22. &controllers.ChartAuthController{},
  23. ),
  24. ),
  25. web.NSNamespace("/table",
  26. web.NSInclude(
  27. &controllers.TableController{},
  28. ),
  29. ),
  30. web.NSNamespace("/excel_info",
  31. web.NSInclude(
  32. &controllers.ExcelInfoController{},
  33. ),
  34. ),
  35. web.NSNamespace("/eta_forum",
  36. web.NSInclude(
  37. &controllers.EtaForumChartController{},
  38. ),
  39. ),
  40. )
  41. web.AddNamespace(ns)
  42. }