12345678910111213141516171819202122232425262728 |
- 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"),
- // 组织
- beego.NSRouter("/organize/detail", &OrganizeController{}, "get:GetDetail"),
- beego.NSRouter("/organize/save", &OrganizeController{}, "post:Save"),
- beego.NSRouter("/organize/list", &OrganizeController{}, "post:List"),
- )
- return ns
- }
|