DataSource.go 768 B

123456789101112131415161718
  1. package routers
  2. import (
  3. "Cold_Api/conf"
  4. "Cold_Api/controllers"
  5. beego "github.com/beego/beego/v2/server/web"
  6. )
  7. func init() {
  8. ns := beego.NewNamespace(conf.Version,
  9. beego.NSRouter("/DataSource", &controllers.DataSourceController{}, "*:DataSource_Exec"), // 执行sql
  10. beego.NSRouter("/DataSource/List", &controllers.DataSourceController{}, "*:DataSource_List"), // 数据源列表
  11. beego.NSRouter("/DataSource/Add", &controllers.DataSourceController{}, "*:DataSource_Add"), // 添加数据源
  12. beego.NSRouter("/DataSource/Edit", &controllers.DataSourceController{}, "*:DataSource_Edit"), // 编辑数据源
  13. beego.NSRouter("/DataSource/Del", &controllers.DataSourceController{}, "*:DataSource_Del"), // 删除数据源
  14. )
  15. beego.AddNamespace(ns)
  16. }