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