router.go 953 B

123456789101112131415161718192021222324
  1. package ldap
  2. import (
  3. "github.com/astaxie/beego"
  4. )
  5. func InitRouter(prefix string) *beego.Namespace {
  6. ns := beego.NewNamespace(prefix+"/ldap",
  7. beego.NSRouter("/server/active", &ServerController{}, "get:GetServer"),
  8. beego.NSRouter("/server/list", &ServerController{}, "post:GetServers"),
  9. beego.NSRouter("/server", &ServerController{}, "post:Update"),
  10. beego.NSRouter("/server/verify", &ServerController{}, "post:Verify"),
  11. beego.NSRouter("/server/detail", &ServerController{}, "get:GetServerDetail"),
  12. beego.NSRouter("/login", &UserController{}, "post:Login"),
  13. beego.NSRouter("/user/sync", &UserController{}, "post:SyncUsers"),
  14. beego.NSRouter("/user/updatePassword", &UserController{}, "post:UpdateUserPassword"),
  15. beego.NSRouter("/user/detail", &UserController{}, "get:GetDetail"),
  16. beego.NSRouter("/user/save", &UserController{}, "post:SaveUser"),
  17. beego.NSRouter("/user/list", &UserController{}, "post:GetUsers"),
  18. )
  19. return ns
  20. }