123456789101112131415161718192021222324 |
- package ldap
- import (
- "github.com/astaxie/beego"
- )
- func InitRouter(prefix string) *beego.Namespace {
- ns := beego.NewNamespace(prefix+"/ldap",
- beego.NSRouter("/server/active", &ServerController{}, "get:GetServer"),
- beego.NSRouter("/server/list", &ServerController{}, "post:GetServers"),
- beego.NSRouter("/server", &ServerController{}, "post:Update"),
- beego.NSRouter("/server/verify", &ServerController{}, "post:Verify"),
- beego.NSRouter("/server/detail", &ServerController{}, "get:GetServerDetail"),
- beego.NSRouter("/login", &UserController{}, "post:Login"),
- beego.NSRouter("/user/sync", &UserController{}, "post:SyncUsers"),
- beego.NSRouter("/user/updatePassword", &UserController{}, "post:UpdateUserPassword"),
- beego.NSRouter("/user/detail", &UserController{}, "get:GetDetail"),
- beego.NSRouter("/user/save", &UserController{}, "post:SaveUser"),
- beego.NSRouter("/user/list", &UserController{}, "post:GetUsers"),
- )
- return ns
- }
|