Documentation
¶
Overview ¶
this package provide method which handle domain share action
Index ¶
- Variables
- func HomePage(ctx *context.Context)
- func HomePageMenus(ctx *context.Context)
- func IndexPage(ctx *context.Context)
- func LoginSystem(ctx *context.Context)
- func LogoutSystem(ctx *context.Context)
- func SubSystemEntry(ctx *context.Context)
- type DomainShareController
- func (this DomainShareController) Delete(ctx *context.Context)
- func (this DomainShareController) Get(ctx *context.Context)
- func (this *DomainShareController) GetAccessDomain(ctx *context.Context)
- func (this *DomainShareController) GetDomainOwner(ctx *context.Context)
- func (DomainShareController) Page(ctx *context.Context)
- func (this DomainShareController) Post(ctx *context.Context)
- func (this DomainShareController) Put(ctx *context.Context)
- func (this DomainShareController) UnAuth(ctx *context.Context)
Constants ¶
This section is empty.
Variables ¶
var DomainCtl = &domainController{models: &models.DomainMmodel{}}
// contains filtered or unexported fields }
var HandleLogsCtl = &handleLogsController{}
var HelpCtl = &helpController{}
var PasswdController = &passwdController{ p: &models.PasswdModels{}, }
var ResourceCtl = &resourceController{ new(models.ResourceModel), }
var RoleAndResourceCtl = &roleAndResourceController{ new(models.RoleModel), new(models.RoleAndResourceModel), new(models.ResourceModel), }
var RoleCtl = &roleController{ models.RoleModel{}, }
var SwaggerCtl = &swaggerController{}
var ThemeCtl = &themeController{ new(models.UserThemeModel), new(models.ThemeResourceModel), }
var UserCtl = &userController{ new(models.UserModel), }
var UserRolesCtl = &userRolesController{ models: new(models.UserRolesModel), }
Functions ¶
func HomePage ¶
swagger:operation GET /HomePage StaticFiles IndexPage
返回用户登录后的主菜单页面
用户登录成功后,将会根据用户主题,返回用户的主菜单页面.
--- produces: - application/json - application/xml - text/xml - text/html responses:
'200': description: all domain information
func HomePageMenus ¶
swagger:operation GET /v1/auth/main/menu HomePageMenus HomePageMenus
If the request is successful, will return the user to be able to access the menu information ¶
The system will check user permissions. So,you must first login system,and then you can send the request.
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: TypeId in: query description: The menu type, 1 means home page ,2 means subsystem page required: true type: string format:
- name: Id in: query description: This up menu id , the response will return the lower menu information of the up menu id required: true type: string format:
responses:
'200': description: success '403': description: disconnect '421': description: get menu information failed.
func IndexPage ¶
swagger:operation GET / StaticFiles IndexPage
系统首页页面
API将会返回系统首页页面给客户端 ¶
--- produces: - application/json - application/xml - text/xml - text/html responses:
'200': description: all domain information
func LoginSystem ¶
swagger:operation POST /login LoginSystem LoginSystem
系统登录处理服务
客户端发起登录请求到这个API,系统对用户和密码进行校验,成功返回true,如果用户和密码对应不上,返回false
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: username in: query description: domain code number required: true type: string format:
- name: password in: query description: domain code number required: true type: string format:
responses:
'200': description: all domain information
func LogoutSystem ¶
swagger:operation POST /logout LoginSystem LoginSystem
安全退出系统
API处理用户退出系统请求,退出系统后,系统将修改客户端的cookie信息,使其连接过时.
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: username in: query description: domain code number required: true type: string format:
- name: password in: query description: domain code number required: true type: string format:
responses:
'200': description: all domain information
func SubSystemEntry ¶
swagger:operation GET /v1/auth/index/entry StaticFiles SubSystemEntry
According to the ID number, return subsystem information page ¶
The system will check user permissions. So,you must first login system,and then you can send the request.
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: Id in: query description: subsystem id number. required: true type: string format:
responses:
'200': description: success '403': description: disconnect, please login. '404': description: page not found
Types ¶
type DomainShareController ¶
type DomainShareController struct {
// contains filtered or unexported fields
}
func (DomainShareController) Delete ¶
func (this DomainShareController) Delete(ctx *context.Context)
swagger:operation POST /v1/auth/domain/share/delete domainShareController postomainShareControll
删除某个域指定域的共享对象
在用户请求时,需要传入用户账号
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
- name: JSON in: query description: json格式信息,例如[{Uuid\:value}] required: true type: string format:
responses:
'200': description: success
func (DomainShareController) Get ¶
func (this DomainShareController) Get(ctx *context.Context)
swagger:operation GET /v1/auth/domain/share/get domainShareController getdomainShareControll
返回某个域的共享对象
客户端在请求中传入域,系统将会查询这个域的共享独享列表.
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
responses:
'200': description: all domain information '403': description: Insufficient permissions '419': description: get domain share information failed.
func (*DomainShareController) GetAccessDomain ¶
func (this *DomainShareController) GetAccessDomain(ctx *context.Context)
swagger:operation GET /v1/auth/domain/owner domainShareController postomainShareControll
获取用户能够访问到的域信息.
当一个域A被共享给域B,则B将可以访问到A中的信息,这个API,将会放回某个指定域所有能够被访问到的对象.
--- produces: - application/json - application/xml - text/xml - text/html responses:
'200': description: success '403': description: Insufficient permissions '421': description: get domain that user is able to access failed.
func (*DomainShareController) GetDomainOwner ¶
func (this *DomainShareController) GetDomainOwner(ctx *context.Context)
swagger:operation GET /v1/auth/domain/self/owner domainShareController postomainShareControll
获取用户能够访问到的域信息.
当一个域A被共享给域B,则B将可以访问到A中的信息,这个API,将会放回某个指定域所有能够被访问到的对象.
--- produces: - application/json - application/xml - text/xml - text/html responses:
'200': description: success
func (DomainShareController) Page ¶
func (DomainShareController) Page(ctx *context.Context)
swagger:operation GET /v1/auth/domain/share/page StaticFiles DomainShareController
返回共享域管理页面
用户需要首先登录系统, 系统会对用户权限进行校验,校验成功,将会返回共享域管理页面.
用户需要在request中传入domain_id, 系统将会返回这个域的详细信息
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
responses:
'200': description: all domain information '403': description: Insufficient permissions '419': description: get domain information failed '404': description: page not found
func (DomainShareController) Post ¶
func (this DomainShareController) Post(ctx *context.Context)
swagger:operation POST /v1/auth/domain/share/post domainShareController postomainShareControll
新增共享域信息
首先,系统会校验用户的权限信息,如果用户被授权,则进行字段校验,如果新增的域字段信息格式正确,将会写入数据库.
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
- name: target_domain_id in: query description: domain code number required: true type: string format:
- name: auth_level in: query description: domain code number required: true type: string format:
responses:
'200': description: success
func (DomainShareController) Put ¶
func (this DomainShareController) Put(ctx *context.Context)
swagger:operation PUT /v1/auth/domain/share/put domainShareController postomainShareControll
更新指定域的共享对象
在请求更新时,需要传入域id,域的共享对象id,共享模式
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
- name: target_domain_id in: query description: domain code number required: true type: string format:
- name: auth_level in: query description: domain code number required: true type: string format:
responses:
'200': description: success
func (DomainShareController) UnAuth ¶
func (this DomainShareController) UnAuth(ctx *context.Context)
swagger:operation GET /v1/auth/domain/share/unauth domainShareController getdomainShareControll
返回某个指定的域没有共享的对象
根据传入的domain_id, 查询这个域还没有共享的域信息.
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
responses:
'200': description: success
Source Files
¶
- domainController.go
- domainShareController.go
- handleLogController.go
- helpController.go
- indexController.go
- loginController.go
- mainMenuController.go
- orgController.go
- passwdController.go
- resourceController.go
- roleControllers.go
- roleResourceController.go
- swaggerController.go
- themeController.go
- userControllers.go
- userRolesController.go