router.go 904 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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_data_init/controllers"
  11. "eta/eta_data_init/controllers/xiangyu"
  12. beego "github.com/beego/beego/v2/server/web"
  13. )
  14. func init() {
  15. ns := beego.NewNamespace("/v1",
  16. beego.NSNamespace("/data_init",
  17. beego.NSInclude(
  18. &controllers.DataInitController{},
  19. ),
  20. ),
  21. beego.NSNamespace("/fix",
  22. beego.NSInclude(
  23. &controllers.DataFixController{},
  24. ),
  25. ),
  26. beego.NSNamespace("/xy",
  27. beego.NSInclude(
  28. &xiangyu.XyController{},
  29. ),
  30. ),
  31. beego.NSNamespace("/admin_init",
  32. beego.NSInclude(
  33. &controllers.AdminInitController{},
  34. ),
  35. ),
  36. )
  37. beego.AddNamespace(ns)
  38. }