controllers

package
v0.0.0-...-fa598d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Err404                = &ControllerError{404, "err.Err404", "", ""}
	Err403                = &ControllerError{403, "err.Err403", "", ""}
	ErrInstall            = &ControllerError{10000, "err.ErrInstall", "", ""}
	ErrInputData          = &ControllerError{10001, "err.ErrInputData", "", ""}
	ErrDatabase           = &ControllerError{10002, "err.ErrDatabase", "", ""}
	ErrDupUser            = &ControllerError{10003, "err.ErrDupUser", "", ""}
	ErrNoUser             = &ControllerError{10004, "err.ErrNoUser", "", ""}
	ErrPass               = &ControllerError{10005, "err.ErrPass", "", ""}
	ErrNoUserPass         = &ControllerError{10006, "err.ErrNoUserPass", "", ""}
	ErrNoUserChange       = &ControllerError{10007, "err.ErrNoUserChange", "", ""}
	ErrInvalidUser        = &ControllerError{10008, "err.ErrInvalidUser", "", ""}
	ErrOpenFile           = &ControllerError{10009, "err.ErrOpenFile", "", ""}
	ErrWriteFile          = &ControllerError{10010, "err.ErrWriteFile", "", ""}
	ErrSystem             = &ControllerError{10011, "err.ErrSystem", "", ""}
	ErrExpired            = &ControllerError{10012, "err.ErrExpired", "", ""}
	ErrPermission         = &ControllerError{10013, "err.ErrPermission", "", ""}
	Actionsuccess         = &ControllerError{90000, "ok.ActionSuccess", "", ""}
	ErrGenJwt             = &ControllerError{10014, "err.ErrGenJwt", "", ""}
	ErrChkJwt             = &ControllerError{10012, "err.ErrChkJwt", "", ""}
	ErrIdData             = &ControllerError{10016, "err.ErrIdData", "", ""}
	ErrDifferentPasswords = &ControllerError{10017, "err.ErrDifferentPasswords", "", ""}
	ErrAddFail            = &ControllerError{11000, "err.ErrAddFail", "", ""}
	ErrEditFail           = &ControllerError{11001, "err.ErrEditFail", "", ""}
	ErrDelFail            = &ControllerError{11002, "err.ErrDelFail", "", ""}
	ErrInvalidParams      = &ControllerError{11003, "err.ErrInvalidParams", "", ""}
	ErrRoleAssignFail     = &ControllerError{12000, "err.ErrRoleAssignFail", "", ""}
	ErrMenuData           = &ControllerError{12001, "err.ErrMenuData", "", ""}
	ErrCaptchaEmpty       = &ControllerError{13001, "err.ErrCaptchaEmpty", "", ""}
	ErrCaptcha            = &ControllerError{13002, "err.ErrCaptcha", "", ""}
	ErrDeptDel            = &ControllerError{13003, "err.ErrDeptDel", "", "部门内仍有成员,请先行转移到其它部门"}
	ErrDeptHasMember      = &ControllerError{13004, "err.ErrDeptHasMember", "", "部门内仍有成员"}
	ErrDupRecord          = &ControllerError{13005, "err.ErrDupRecord", "", ""}
	ErrWrongRefreshToken  = &ControllerError{13006, "err.ErrWrongRefreshToken", "", ""}
	ErrBindDingtalk       = &ControllerError{13007, "err.ErrBindDingtalk", "", ""}
	ErrUnBindDingtalk     = &ControllerError{13008, "err.ErrUnBindDingtalk", "", ""}
	ErrGoogleBindCode     = &ControllerError{13009, "err.ErrGoogleBindCode", "", ""}
	ErrSendMail           = &ControllerError{13010, "err.ErrSendMail", "", ""}
	ErrValidation         = &ControllerError{13011, "err.ErrValidate", "", ""}
	ErrNoRecord           = &ControllerError{13012, "err.ErrNoRecord", "", ""}
	ErrHasSubRecord       = &ControllerError{13013, "err.ErrHasSubRecord", "", ""}
	ErrUploadAvatar       = &ControllerError{13014, "err.ErrUploadAvatar", "", ""}
)

Functions

func Healthy

func Healthy(c *gin.Context)

@Tags Health @Summary 健康检查 @Produce json @Success 200 {string} json "{"code":200,"data":{""}}" @Router /healthcheck [get]

Types

type AccountController

type AccountController struct {
	BaseController
}

func (*AccountController) AccountInfo

func (a *AccountController) AccountInfo(c *gin.Context)

@Summary 获取个人中心用户信息 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/accountinfo [get]

func (*AccountController) BindGoogle2faCode

func (a *AccountController) BindGoogle2faCode(c *gin.Context)

@Summary 绑定2fa goole 验证码 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/bindcode [get]

func (*AccountController) CheckGoogle2faCode

func (a *AccountController) CheckGoogle2faCode(c *gin.Context)

@Summary 验证2fa goole 验证码 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/check-google-2fa-code [get]

func (*AccountController) Close2fa

func (a *AccountController) Close2fa(c *gin.Context)

@Summary 关闭Google 两步验证 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/close2fa [post]

func (*AccountController) EditPassword

func (a *AccountController) EditPassword(c *gin.Context)

@Summary 更新个人密码 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/account/password [put] EditPassword - update login user's password

func (*AccountController) EmailVerify

func (a *AccountController) EmailVerify(c *gin.Context)

@Summary 验证邮件地址(验证) @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/emailverification [get]

func (*AccountController) FindCodeOpen

func (a *AccountController) FindCodeOpen(c *gin.Context)

@Summary 判断是否开启 Google 两步验证 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/close2fa [post]

func (AccountController) GetDomains

func (AccountController) GetDomains(c *gin.Context)

@Summary 获取用户管理域 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/domains [get] GetDomains - get user managing domains

func (AccountController) GetPermissionsWithMenu

func (a AccountController) GetPermissionsWithMenu(c *gin.Context)

@Tags Users @Summary 获取用户权限列表(带菜单) @Security ApiKeyAuth @Param id path int true "用户id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/account/permissions [get]

func (AccountController) Info

func (a AccountController) Info(c *gin.Context)

@Summary 登录用户信息 @Tags account @Security ApiKeyAuth @Description 登陆用户信息接口 @Accept json @Produce json @Param userId path int true "用户ID" @Success 200 {array} model.User "{"code":200,"data":{"id":1,"name":"wutong"}}" @Router /v1/account/info [get]

func (*AccountController) LdapAddUser

func (a *AccountController) LdapAddUser(c *gin.Context)

func (*AccountController) SendVerifymail

func (a *AccountController) SendVerifymail(c *gin.Context)

@Summary 验证邮件地址(发送邮件) @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/third [get]

func (*AccountController) ThirdList

func (a *AccountController) ThirdList(c *gin.Context)

@Summary 第三方绑定列表 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/third [get]

func (*AccountController) ThirdUnbind

func (a *AccountController) ThirdUnbind(c *gin.Context)

@Summary 解除绑定第三方应用 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/thirdunbind [get]

func (*AccountController) Thirdbind

func (a *AccountController) Thirdbind(c *gin.Context)

@Summary 解除绑定第三方应用 @Tags account @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[]}}" @Router /v1/account/thirdbind [get]

func (*AccountController) UploadAvatar

func (a *AccountController) UploadAvatar(c *gin.Context)

upload avatar

type AuthController

type AuthController struct {
	BaseController
}

func (*AuthController) JwtAuthLogin

func (u *AuthController) JwtAuthLogin(c *gin.Context)

@Tags Users @Summary 用户登陆 @Accept json @Produce json @Param username formData string true "登录名" @Param password formData string true "密码" @Param captchaid formData string false "验证码ID" @Param captchaval formData string false "验证码" @Success 200 {array} model.User "{"code":200,"data":{"id":1,"name":"wutong"}}" @Failure 400 {string} json "{"code":10004,"msg": "用户信息不存在"}" @Router /v1/users/login [post]

func (*AuthController) JwtAuthRefreshLogin

func (u *AuthController) JwtAuthRefreshLogin(c *gin.Context)

@Tags Users @Summary 用户refresh-token接口 @Accept json @Produce json @Accept multipart/form-data @Produce json @Success 200 {array} model.User "{"code":200,"data":{"id":1,"name":"wutong"}}" @Failure 400 {string} json "{"code":10004,"msg": "用户信息不存在"}" @Router /v1/users/login/refresh [post]

type BaseController

type BaseController struct {
}

func (*BaseController) BindAndValidate

func (bc *BaseController) BindAndValidate(c *gin.Context, obj interface{}) bool

type ControllerError

type ControllerError struct {
	Code     int    `json:"code"`
	Langkey  string `json:"langkey"`
	Message  string `json:"msg"`
	Moreinfo string `json:"moreinfo"`
}

type DatePermController

type DatePermController struct {
	BaseController
}

func (*DatePermController) Create

func (d *DatePermController) Create(c *gin.Context)

Create data permission @Tags DataPerm @Summary 新增数据权限 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/datas [post]

func (*DatePermController) Delete

func (d *DatePermController) Delete(c *gin.Context)

Delete data permission @Tags DataPerm @Summary 删除项目 @Security ApiKeyAuth @Param id path string true "要删除的id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/datas/{id} [delete]

func (*DatePermController) Edit

func (d *DatePermController) Edit(c *gin.Context)

Edit data permission @Tags DataPerm @Summary 编辑数据权限 @Security ApiKeyAuth @Produce json @Param id path int true "需要编辑的id" @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/datas/{id} [put]

func (*DatePermController) Get

func (d *DatePermController) Get(c *gin.Context)

Show data permission @Tags DataPerm @Summary 数据权限详情 @Security ApiKeyAuth @Produce json @Param id path string true "数据权限id" @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/datas/{id} [get]

func (*DatePermController) List

func (d *DatePermController) List(c *gin.Context)

List data permission @Tags DataPerm @Summary 数据权限列表[分页+搜索] @Security ApiKeyAuth @Produce json @Param limit query int false "条数" @Param skip query int false "偏移量" @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/datas [get]

type DeptController

type DeptController struct {
	BaseController
}

func (*DeptController) CheckNoMember

func (d *DeptController) CheckNoMember(c *gin.Context)

@Tags Department @Summary 检查部门下面是否有用户 @Security ApiKeyAuth @Param id path int true "部门id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/depts/{id} [put]

func (*DeptController) Create

func (d *DeptController) Create(c *gin.Context)

@Tags Department @Summary 新增部门 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/depts [post]

func (*DeptController) Delete

func (d *DeptController) Delete(c *gin.Context)

@Tags Department @Summary 删除部门 @Security ApiKeyAuth @Param id path int true "部门id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/depts/{id} [delete]

func (*DeptController) Edit

func (d *DeptController) Edit(c *gin.Context)

@Tags Department @Summary 编辑部门 @Security ApiKeyAuth @Param id path int true "部门id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/depts/{id} [put]

func (*DeptController) Get

func (d *DeptController) Get(c *gin.Context)

@Tags Department @Summary 部门信息 @Security ApiKeyAuth @Param id path int true "部门id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/depts/{id} [get]

func (*DeptController) List

func (d *DeptController) List(c *gin.Context)

@Tags Department @Summary 部门列表[分页+搜索] @Security ApiKeyAuth @Param limit query int false "条数" @Param skip query int false "偏移量" @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/depts [get]

type DomainController

type DomainController struct {
	BaseController
}

func (*DomainController) Create

func (d *DomainController) Create(c *gin.Context)

@Tags Domain @Summary 新增项目 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/domains [post]

func (*DomainController) Delete

func (d *DomainController) Delete(c *gin.Context)

@Tags Domain @Summary 删除项目 @Security ApiKeyAuth @Param id path int true "项目id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/domains/{id} [delete]

func (*DomainController) Edit

func (d *DomainController) Edit(c *gin.Context)

@Tags Domain @Summary 编辑项目 @Security ApiKeyAuth @Param id path int true "项目id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/domains/{id} [put]

func (*DomainController) Get

func (d *DomainController) Get(c *gin.Context)

@Tags Domain @Summary 项目信息 @Security ApiKeyAuth @Param id path int true "项目id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/domains/{id} [get]

func (*DomainController) List

func (d *DomainController) List(c *gin.Context)

@Tags Domain @Summary 项目列表[分页+搜索] @Security ApiKeyAuth @Param limit query int false "条数" @Param skip query int false "偏移量" @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/domains [get]

type InstallController

type InstallController struct {
	BaseController
}

func (*InstallController) Install

func (i *InstallController) Install(c *gin.Context)

func (*InstallController) IsLock

func (i *InstallController) IsLock(c *gin.Context)

type LogController

type LogController struct {
	BaseController
}

func (LogController) LoginLogDetail

func (LogController) LoginLogDetail(c *gin.Context)

@Summary 登录日志信息 @Tags Log @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/log/login/{logId} [get]

func (LogController) LoginLogLists

func (LogController) LoginLogLists(c *gin.Context)

@Summary 登录日志列表 @Tags Log @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/log/login [get]

func (LogController) OperationLogDetail

func (LogController) OperationLogDetail(c *gin.Context)

@Summary 操作日志信息 @Tags Log @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/log/operation [get]

func (LogController) OperationLogLists

func (LogController) OperationLogLists(c *gin.Context)

@Summary 操作日志列表 @Tags Log @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/log/operation/{logId} [get]

type MenuController struct {
	BaseController
}
func (m *MenuController) Create(c *gin.Context)

@Summary 新增菜单 @Tags menu @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/menus [post] Create - c of crud

func (m *MenuController) Delete(c *gin.Context)

@Summary 删除菜单 @Tags menu @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/menus/:id [delete] Delete - d of crud

func (u *MenuController) Edit(c *gin.Context)

@Summary 编辑菜单 @Tags menu @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/menus/:id [put] Edit - u of crud

func (m *MenuController) Get(c *gin.Context)

@Summary 菜单信息 @Tags menu @Security ApiKeyAuth @Accept json @Produce json @Success 200 {array} model.User "{"code":200,"data":{"id":1,"name":"wutong"}}" @Failure 400 {string} json "{"code":10004,"msg": "用户信息不存在"}" @Router /v1/menus/:id [get]

func (m *MenuController) List(c *gin.Context)

@Summary 菜单列表 @Tags menu @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/menus [get] List - r of crud

type RoleController

type RoleController struct {
	BaseController
}

func (*RoleController) Create

func (r *RoleController) Create(c *gin.Context)

@Tags Role @Summary 新增角色 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/roles [post]

func (*RoleController) Delete

func (r *RoleController) Delete(c *gin.Context)

@Summary 删除角色信息 @Tags Role @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/roles/:id [delete] Delete - d of crud

func (*RoleController) Edit

func (r *RoleController) Edit(c *gin.Context)

@Summary 更新角色信息 @Tags Role @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/roles/:id [put] Edit - u of crud

func (*RoleController) Get

func (r *RoleController) Get(c *gin.Context)

@Tags Role @Summary 角色信息 @Security ApiKeyAuth @Param id path int true "角色id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1,"name":"test"}}" @Router /v1/roles/{id} [get]

func (*RoleController) List

func (r *RoleController) List(c *gin.Context)

@Tags Role @Summary 角色列表[分页+搜索] @Security ApiKeyAuth @Param limit query int false "条数" @Param skip query int false "偏移量" @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/roles [get]

type SettingController

type SettingController struct {
	BaseController
}

func (*SettingController) EmailList

func (s *SettingController) EmailList(c *gin.Context)

@Tags Setting @Summary Email 设置 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":""} @Router /v1/setting/email [get]

func (*SettingController) EmailUpdate

func (s *SettingController) EmailUpdate(c *gin.Context)

@Tags Setting @Summary Email 设置 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":""} @Router /v1/setting/email [post]

func (*SettingController) LdapList

func (s *SettingController) LdapList(c *gin.Context)

@Tags Setting @Summary Ldap 设置 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":""} @Router /v1/setting/ldap [get]

func (*SettingController) LdapUpdate

func (s *SettingController) LdapUpdate(c *gin.Context)

func (*SettingController) SyncDingtalk

func (d *SettingController) SyncDingtalk(c *gin.Context)

@Tags Department @Summary 同步钉钉部门信息 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":""}" @Router /v1/depts/sync/dingtalk [get]

type SyncController

type SyncController struct {
	BaseController
}

func (*SyncController) SyncDingTalk

func (s *SyncController) SyncDingTalk(c *gin.Context)

@Tags Sync @Summary 钉钉组织架构+用户同步 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":""} @Router /v1/sync/dingtalk [post]

type UserController

type UserController struct {
	BaseController
}

func (*UserController) Create

func (u *UserController) Create(c *gin.Context)

@Tags Users @Summary 新增用户 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/users?limit=20&offset=0 [get]

func (*UserController) Delete

func (u *UserController) Delete(c *gin.Context)

@Tags Users @Summary 删除用户 @Security ApiKeyAuth @Param id path int true "用户id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/users/{id} [delete]

func (*UserController) DomainPermCheck

func (u *UserController) DomainPermCheck(c *gin.Context)

@Tags Users @Summary 检查用户权限 @Security ApiKeyAuth @Param id int true "用户id" @Param domain string "" @Param perm string "" @Produce json @Success 200 {string} json "{"code":200,"data":{"result":true}}" @Router /v1/user/perm/check [post]

func (*UserController) Edit

func (u *UserController) Edit(c *gin.Context)

@Tags Users @Summary 编辑用户 @Security ApiKeyAuth @Produce json @Param id path int true "用户id" @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/users/{id} [put]

func (*UserController) EditPassword

func (u *UserController) EditPassword(c *gin.Context)

@Tags Users @Summary 更新用户密码 @Security ApiKeyAuth @Param id path int true "用户id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/users/{id}/password [put]

func (*UserController) EditStatus

func (u *UserController) EditStatus(c *gin.Context)

@Tags Users @Summary 更新用户状态 @Security ApiKeyAuth @Param id path int true "用户id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/users/{id}/status [put]

func (*UserController) Get

func (u *UserController) Get(c *gin.Context)

@Tags Users @Summary 用户信息 @Security ApiKeyAuth @Accept json @Produce json @Param id path int true "用户id" @Success 200 {array} model.User "{"code":200,"data":{"id":1,"name":"wutong"}}" @Failure 400 {string} json "{"code":10004,"msg": "用户信息不存在"}" @Router /v1/users/{id} [get]

func (*UserController) GetDomainMenus

func (u *UserController) GetDomainMenus(c *gin.Context)

@Tags Users @Summary 获取用户特定域相关菜单 @Security ApiKeyAuth @Param domain string "" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/user/menu [get]

func (*UserController) GetDomainPermissions

func (u *UserController) GetDomainPermissions(c *gin.Context)

@Tags Users @Summary 获取用户权限列表 @Security ApiKeyAuth @Param id int true "用户id" @Param domain string "" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/user/perm/list [get]

func (*UserController) GetUserPermissionsWithMenu

func (u *UserController) GetUserPermissionsWithMenu(c *gin.Context)

@Tags Users @Summary 获取用户权限列表(带菜单) @Security ApiKeyAuth @Param id path int true "用户id" @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/users/{id}/permissions [get]

func (*UserController) List

func (u *UserController) List(c *gin.Context)

@Tags Users @Summary 用户列表[分页+搜索] @Security ApiKeyAuth @Param limit query int false "条数" @Param skip query int false "偏移量" @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/users?limit=20&offset=0 [get]

func (*UserController) Roles

func (u *UserController) Roles(c *gin.Context)

@Tags Users @Summary 用户角色列表[分页+搜索] @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"result":[...],"total":1}}" @Router /v1/users/:id/roles [get]

func (*UserController) UpdateDepartment

func (u *UserController) UpdateDepartment(c *gin.Context)

@Tags Users @Summary 移动部门 @Security ApiKeyAuth @Produce json @Success 200 {string} json "{"code":200,"data":{"id":1}}" @Router /v1/users/department/move [post]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL