Documentation ¶
Index ¶
- func Register(r *gin.Engine) error
- type ApiUser
- func (api *ApiUser) GetUserInfo(c *gin.Context)
- func (api *ApiUser) Login(c *gin.Context)
- func (api *ApiUser) Logout(c *gin.Context)
- func (api *ApiUser) Register(c *gin.Context)
- func (api *ApiUser) UserRelativeGroup(c *gin.Context)
- func (api *ApiUser) UserRelativeGroupAdd(c *gin.Context)
- func (api *ApiUser) UserRelativeGroupDelete(c *gin.Context)
- func (api *ApiUser) UserRelativeMenu(c *gin.Context)
- func (api *ApiUser) UserRelativeRole(c *gin.Context)
- func (api *ApiUser) UserRelativeRoleAdd(c *gin.Context)
- func (api *ApiUser) UserRelativeRoleDelete(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiUser ¶
type ApiUser struct {
// contains filtered or unexported fields
}
func NewUserApi ¶
func (*ApiUser) GetUserInfo ¶
GetUserInfo godoc @Summary 获取用户详情的接口 @Security ApiKeyAuth @Description 根据token获取id @Produce json @Tags User @Success 200 {object} base.Response @Router /user/info [get]
func (*ApiUser) Login ¶
Login godoc @Summary 用户登录接口 @Security ApiKeyAuth @Description 用户登录接口 @accept application/json @Produce application/json @Param data body sys.LoginRequest true "用户名,密码,账户类型" @Tags User @Success 200 {object} base.Response @Router /user/login [post]
func (*ApiUser) Logout ¶
Logout godoc @Summary 用户退出接口 @Security ApiKeyAuth @Description 用户退出接口 @Produce json @Tags User @Success 200 {object} base.Response @Router /user/logout [post]
func (*ApiUser) Register ¶
Register godoc @Summary 用户注册接口 @Security ApiKeyAuth @Description 用户注册接口 @Produce json @Tags User @Success 200 {object} base.Response @Router /user/register [post]
func (*ApiUser) UserRelativeGroup ¶
UserRelativeGroup godoc @Summary 获得用户分组资源接口 @Security ApiKeyAuth @Description 获得用户分组资源接口 @accept application/json @Produce application/json @Param id path int true "用户id" @Param domain query string false "域" @Tags User @Success 200 {object} base.Response @Router /user/relative/group/{id} [get]
func (*ApiUser) UserRelativeGroupAdd ¶
UserRelativeGroupAdd godoc @Summary 新增用户分组接口 @Security ApiKeyAuth @Description 新增用户分组接口 @accept application/json @Produce application/json @Param data body sys.RelativeUserRequest true "关联参数" @Tags User @Success 200 {object} base.Response @Router /user/relative/group/add [post]
func (*ApiUser) UserRelativeGroupDelete ¶
UserRelativeGroupDelete godoc @Summary 删除用户分组接口 @Security ApiKeyAuth @Description 删除用户分组接口 @accept application/json @Produce application/json @Param data body sys.RelativeUserRequest true "关联参数" @Tags User @Success 200 {object} base.Response @Router /user/relative/group/delete [delete]
func (*ApiUser) UserRelativeMenu ¶
UserRelativeMenu godoc @Summary 获得用户菜单接口 @Security ApiKeyAuth @Description 获得用户菜单接口 @accept application/json @Produce application/json @Param id path int true "用户id" @Param domain query string false "域" @Tags User @Success 200 {object} base.Response @Router /user/relative/menu/{id} [get]
func (*ApiUser) UserRelativeRole ¶
UserRelativeRole godoc @Summary 获得用户角色权限接口 @Security ApiKeyAuth @Description 获得用户角色权限接口 @accept application/json @Produce application/json @Param id path int true "用户id" @Param domain query string false "域" @Tags User @Success 200 {object} base.Response @Router /user/relative/role/{id} [get]
func (*ApiUser) UserRelativeRoleAdd ¶
UserRelativeRoleAdd godoc @Summary 用户关联角色接口 @Security ApiKeyAuth @Description 用户关联角色接口 @accept application/json @Produce application/json @Param data body sys.RelativeUserRequest true "关联参数" @Tags User @Success 200 {object} base.Response @Router /user/relative/role/add [post]
func (*ApiUser) UserRelativeRoleDelete ¶
UserRelativeRoleDelete godoc @Summary 删除用户角色接口 @Security ApiKeyAuth @Description 删除用户角色接口 @accept application/json @Produce application/json @Param data body sys.RelativeUserRequest true "关联参数" @Tags User @Success 200 {object} base.Response @Router /user/relative/role/delete [delete]