Documentation ¶
Index ¶
- Variables
- func AddBaseMenu(c *gin.Context)
- func AddMenuAuthority(c *gin.Context)
- func ChangePassword(c *gin.Context)
- func CreateAPI(c *gin.Context)
- func CreateAuthority(c *gin.Context)
- func DeleteAPI(c *gin.Context)
- func DeleteAuthority(c *gin.Context)
- func DeleteBaseMenu(c *gin.Context)
- func GetAPIByID(c *gin.Context)
- func GetAPIList(c *gin.Context)
- func GetAllAPIs(c *gin.Context)
- func GetAuthAndAPI(c *gin.Context)
- func GetAuthorityList(c *gin.Context)
- func GetBaseMenuByID(c *gin.Context)
- func GetBaseMenuTree(c *gin.Context)
- func GetMenu(c *gin.Context)
- func GetMenuAuthority(c *gin.Context)
- func GetMenuList(c *gin.Context)
- func GetUserList(c *gin.Context)
- func Login(c *gin.Context)
- func Regist(c *gin.Context)
- func SetAuthAndAPI(c *gin.Context)
- func SetUserAuthority(c *gin.Context)
- func UpdataAPI(c *gin.Context)
- func UpdataBaseMenu(c *gin.Context)
- func UploadHeaderImg(c *gin.Context)
- type AddMenuAuthorityInfo
- type AuthAndPathIn
- type AuthorityIDInfo
- type ChangePasswordStruct
- type CreateAPIParams
- type CreateAuthorityPatams
- type DeleteAPIParams
- type DeleteAuthorityPatams
- type GetAuthorityID
- type GetByID
- type IDInfo
- type RegistAndLoginStuct
- type SetUserAuth
- type UserHeaderImg
Constants ¶
This section is empty.
Variables ¶
var ( // UserHeaderImgPath ... UserHeaderImgPath = "http://qmplusimg.henrongyi.top" // UserHeaderBucket ... UserHeaderBucket = "qm-plus-img" )
Functions ¶
func AddBaseMenu ¶
AddBaseMenu ... @Tags menu @Summary 新增菜单 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body model.BaseMenu true "新增菜单" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /menu/addBaseMenu [post]
func AddMenuAuthority ¶
AddMenuAuthority ... @Tags authorityAndMenu @Summary 增加menu和角色关联关系 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.AddMenuAuthorityInfo true "增加menu和角色关联关系" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /menu/addMenuAuthority [post]
func ChangePassword ¶
ChangePassword ... @Tags User @Summary 用户修改密码 @Security ApiKeyAuth @Produce application/json @Param data body api.ChangePasswordStruct true "用户修改密码" @Success 200 {object} response "{"success":true,"data":{},"msg":"修改成功"}" @Router /user/changePassword [post]
func CreateAPI ¶
CreateAPI ... @Tags API @Summary 创建基础api @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.CreateAPIParams true "创建api" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /api/createApi [post]
func CreateAuthority ¶
CreateAuthority ... @Tags authority @Summary 创建角色 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.CreateAuthorityPatams true "创建角色" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /authority/createAuthority [post]
func DeleteAPI ¶
DeleteAPI ... @Tags API @Summary 删除指定api @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body model.API true "删除api" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /api/deleteApi [post]
func DeleteAuthority ¶
DeleteAuthority ... @Tags authority @Summary 删除角色 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.DeleteAuthorityPatams true "删除角色" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /authority/deleteAuthority [post]
func DeleteBaseMenu ¶
DeleteBaseMenu ... @Tags menu @Summary 删除菜单 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.IDInfo true "删除菜单" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /menu/deleteBaseMenu [post]
func GetAPIByID ¶
GetAPIByID ... @Tags API @Summary 根据id获取api @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body modelinterface.PageInfo true "分页获取用户列表" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /api/getApiById [post]
func GetAPIList ¶
GetAPIList ... @Tags API @Summary 分页获取API列表 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body modelinterface.PageInfo true "分页获取API列表" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /api/getApiList [post]
func GetAllAPIs ¶
GetAllAPIs ... @Tags API @Summary 获取所有的Api 不分页 @Security ApiKeyAuth @accept application/json @Produce application/json @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /api/getAllApis [post]
func GetAuthAndAPI ¶
GetAuthAndAPI ... @Tags authority @Summary 获取本角色所有有权限的apiId @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.GetAuthorityID true "获取本角色所有有权限的apiId" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /authority/getAuthAndAPI [post]
func GetAuthorityList ¶
GetAuthorityList ... @Tags authority @Summary 分页获取角色列表 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body modelinterface.PageInfo true "分页获取用户列表" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /authority/getAuthorityList [post]
func GetBaseMenuByID ¶
GetBaseMenuByID ... @Tags menu @Summary 根据id获取菜单 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.GetByID true "根据id获取菜单" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /menu/getBaseMenuById [post]
func GetBaseMenuTree ¶
GetBaseMenuTree ... @Tags authorityAndMenu @Summary 获取用户动态路由 @Security ApiKeyAuth @Produce application/json @Param data body api.RegistAndLoginStuct true "可以什么都不填" @Success 200 {object} response "{"success":true,"data":{},"msg":"返回成功"}" @Router /menu/getBaseMenuTree [post]
func GetMenu ¶
GetMenu curl -X POST http://127.0.0.1:8080/menu/getMenuList -H "Content-Type:application/json" -d '{"username": "ljs", "password": "ljs"}' @Tags authorityAndMenu @Summary 获取用户动态路由 @Security ApiKeyAuth @Produce application/json @Param data body api.RegistAndLoginStuct true "可以什么都不填" @Success 200 {object} response "{"success":true,"data":{},"msg":"返回成功"}" @Router /menu/getMenu [post]
func GetMenuAuthority ¶
GetMenuAuthority ... @Tags authorityAndMenu @Summary 获取指定角色menu @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.AuthorityIDInfo true "增加menu和角色关联关系" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /menu/addMenuAuthority [post]
func GetMenuList ¶
GetMenuList ... @Tags menu @Summary 分页获取基础menu列表 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body modelinterface.PageInfo true "分页获取基础menu列表" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /menu/getMenuList [post]
func GetUserList ¶
GetUserList ... @Tags User @Summary 分页获取用户列表 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body modelinterface.PageInfo true "分页获取用户列表" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /user/getUserList [post]
func Login ¶
Login ... @Tags Base @Summary 用户登录 @Produce application/json @Param data body api.RegistAndLoginStuct true "用户登录接口" @Success 200 {object} response "{"success":true,"data":{},"msg":"登陆成功"}" @Router /base/login [post]
func Regist ¶
Regist ... @Tags Base @Summary 用户注册账号 @Produce application/json @Param data body api.RegistAndLoginStuct true "用户注册接口" @Success 200 {object} response "{"success":true,"data":{},"msg":"注册成功"}" @Router /base/regist [post]
func SetAuthAndAPI ¶
SetAuthAndAPI ... @Tags API @Summary 创建api和角色关系 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.AuthAndPathIn true "创建api和角色关系" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /api/setAuthAndApi [post]
func SetUserAuthority ¶
SetUserAuthority ... @Tags User @Summary 设置用户权限 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.SetUserAuth true "设置用户权限" @Success 200 {object} response "{"success":true,"data":{},"msg":"修改成功"}" @Router /user/setUserAuthority [post]
func UpdataAPI ¶
UpdataAPI ... @Tags API @Summary 创建基础api @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body api.CreateAPIParams true "创建api" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /api/updataApi [post]
func UpdataBaseMenu ¶
UpdataBaseMenu ... @Tags menu @Summary 更新菜单 @Security ApiKeyAuth @accept application/json @Produce application/json @Param data body model.BaseMenu true "更新菜单" @Success 200 {object} response "{"success":true,"data":{},"msg":"获取成功"}" @Router /menu/updataBaseMen [post]
func UploadHeaderImg ¶
UploadHeaderImg ... @Tags User @Summary 用户上传头像 @Security ApiKeyAuth @accept multipart/form-data @Produce application/json @Param headerImg formData file true "用户上传头像" @Param username formData string true "用户上传头像" @Success 200 {object} response "{"success":true,"data":{},"msg":"上传成功"}" @Router /user/uploadHeaderImg [post]
Types ¶
type AddMenuAuthorityInfo ¶
AddMenuAuthorityInfo ...
type AuthAndPathIn ¶
AuthAndPathIn ...
type ChangePasswordStruct ¶
type ChangePasswordStruct struct { Username string `json:"username"` Password string `json:"password"` NewPassword string `json:"newPassword"` }
ChangePasswordStruct ...
type CreateAPIParams ¶
CreateAPIParams ...
type CreateAuthorityPatams ¶
type CreateAuthorityPatams struct { AuthorityID string `json:"authorityId"` AuthorityName string `json:"authorityName"` }
CreateAuthorityPatams ...
type DeleteAuthorityPatams ¶
type DeleteAuthorityPatams struct {
AuthorityID uint `json:"authorityId"`
}
DeleteAuthorityPatams ...
type GetAuthorityID ¶
type GetAuthorityID struct {
AuthorityID string `json:"authorityId"`
}
GetAuthorityID ...
type RegistAndLoginStuct ¶
type RegistAndLoginStuct struct { Username string `json:"username"` Password string `json:"password"` }
RegistAndLoginStuct ...
type SetUserAuth ¶
SetUserAuth ...
type UserHeaderImg ¶
UserHeaderImg ...