router.go 880 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. "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.ChartInfoController{},
  18. &controllers.ChartClassifyController{},
  19. ),
  20. ),
  21. web.NSNamespace("/edb",
  22. web.NSInclude(
  23. &controllers.EdbInfoController{},
  24. ),
  25. ),
  26. web.NSNamespace("/login",
  27. web.NSInclude(
  28. &controllers.LoginController{},
  29. ),
  30. ),
  31. web.NSNamespace("/admin",
  32. web.NSInclude(
  33. &controllers.AdminController{},
  34. ),
  35. ),
  36. )
  37. web.AddNamespace(ns)
  38. }