router.go 887 B

1234567891011121314151617181920212223
  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/update", &UserController{}, "post:UpdateUser"),
  16. beego.NSRouter("/user/list", &UserController{}, "post:GetUsers"),
  17. )
  18. return ns
  19. }