Documentation ¶
Index ¶
- Variables
- func AddAPI(c *gin.Context)
- func AddAPP(c *gin.Context)
- func AddMenu(c *gin.Context)
- func AddRole(c *gin.Context)
- func AddTenant(c *gin.Context)
- func AddTitle(c *gin.Context)
- func AddUser(c *gin.Context)
- func ChangePwd(c *gin.Context)
- func CopyTenant(c *gin.Context)
- func DeleteAPI(c *gin.Context)
- func DeleteAPP(c *gin.Context)
- func DeleteMenu(c *gin.Context)
- func DeleteRole(c *gin.Context)
- func DeleteTenant(c *gin.Context)
- func DeleteTitle(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func EnableAPI(c *gin.Context)
- func EnableTenant(c *gin.Context)
- func EnableUser(c *gin.Context)
- func GetAPIDetail(c *gin.Context)
- func GetAPPDetail(c *gin.Context)
- func GetAllAPI(c *gin.Context)
- func GetAllAPP(c *gin.Context)
- func GetAllRole(c *gin.Context)
- func GetAllTenant(c *gin.Context)
- func GetAllTitle(c *gin.Context)
- func GetAllUsers(c *gin.Context)
- func GetMenuDetail(c *gin.Context)
- func GetMenuTree(c *gin.Context)
- func GetRoleDetail(c *gin.Context)
- func GetTenantDetail(c *gin.Context)
- func GetTitleDetail(c *gin.Context)
- func GetUserDetail(c *gin.Context)
- func InitMini()
- func Login(c *gin.Context)
- func Logout(c *gin.Context)
- func Profile(c *gin.Context)
- func QueryAPI(c *gin.Context)
- func QueryAPP(c *gin.Context)
- func QueryMenu(c *gin.Context)
- func QueryRole(c *gin.Context)
- func QueryTenant(c *gin.Context)
- func QueryTitle(c *gin.Context)
- func QueryUser(c *gin.Context)
- func RegisterAuthRouter(r *gin.Engine)
- func RegisterTenantRouter(r *gin.Engine)
- func RegisterWechatRouter(r *gin.Engine)
- func ResetPwd(c *gin.Context)
- func UpdateAPI(c *gin.Context)
- func UpdateAPP(c *gin.Context)
- func UpdateMenu(c *gin.Context)
- func UpdateProfile(c *gin.Context)
- func UpdateRole(c *gin.Context)
- func UpdateTenant(c *gin.Context)
- func UpdateTitle(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func WechatNotify(c *gin.Context)
- type MiniLoginRequest
Constants ¶
This section is empty.
Variables ¶
var ( MiniAppID string MiniAppSecret string )
Functions ¶
func AddAPI ¶
AddAPI godoc @Summary 新增API @Description 新增API @Tags API管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.APIInfo true "Add API" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/api/add [post]
func AddMenu ¶
AddMenu @Summary 新增菜单 @Description 新增菜单 @Tags 菜单管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.MenuInfo true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/menu/add [post]
func AddRole ¶
AddRole @Summary 新增角色 @Description 新增角色 @Tags 角色管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.RoleInfo true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/role/add [post]
func AddTenant ¶
AddTenant @Summary 新增租户 @Description 新增租户 @Tags 租户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.TenantInfo true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/tenant/add [post]
func AddUser ¶
AddUser godoc @Summary 新增用户 @Description 新增用户 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.UserInfo true "用户信息" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/add [post]
func ChangePwd ¶
ChangePwd @Summary 修改密码 @Description 修改密码 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.ChangePwdRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/changepwd [post]
func CopyTenant ¶
CopyTenant @Summary 禁用/启用租户 @Description 禁用/启用租户 @Tags 租户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.EnableRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/tenant/enable [post]
func DeleteAPI ¶
DeleteAPI godoc @Summary 删除API @Description 软删除API @Tags API管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.DelRequest true "Delete API" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/api/delete [delete]
func DeleteMenu ¶
DeleteMenu @Summary 删除菜单 @Description 软删除菜单 @Tags 菜单管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.DelRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/menu/delete [delete]
func DeleteRole ¶
DeleteRole @Summary 删除角色 @Description 软删除角色 @Tags 角色管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.DelRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/role/delete [delete]
func DeleteTenant ¶
DeleteTenant @Summary 删除租户 @Description 软删除租户 @Tags 租户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.DelRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/tenant/delete [delete]
func DeleteTitle ¶
func DeleteUser ¶
DeleteUser @Summary 删除用户 @Description 删除用户 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.DelRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/delete [delete]
func EnableAPI ¶
EnableAPI godoc @Summary 禁用/启用API @Description 禁用/启用API @Tags API管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.EnableRequest true "Enable/Disable API" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/api/enable [post]
func EnableTenant ¶
EnableTenant @Summary 禁用/启用租户 @Description 禁用/启用租户 @Tags 租户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.EnableRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/tenant/enable [post]
func EnableUser ¶
EnableUser @Summary 禁用/启用用户 @Description 禁用/启用用户 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.EnableRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/enable [post]
func GetAPIDetail ¶
GetAPIDetail godoc @Summary 查询明细 @Description 查询明细 @Tags API管理 @Accept json @Produce json @Param id query string true "ID" @Param authorization header string true "jwt token" @Success 200 {object} apipb.GetAPIDetailResponse @Router /api/core/auth/api/detail [get]
func GetAPPDetail ¶
func GetAllAPI ¶
GetAllAPI godoc @Summary 查询所有API @Description 查询所有API @Tags API管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Success 200 {object} apipb.GetAllAPIResponse @Router /api/core/auth/api/all [get]
func GetAllRole ¶
GetAllRole @Summary 查询所有角色 @Description 查询所有角色 @Tags 角色管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param tenantID query string false "租户ID" @Param containerComm query bool false "是否包含公共角色" @Success 200 {object} apipb.QueryRoleResponse @Router /api/core/auth/role/all [get]
func GetAllTenant ¶
GetAllTenant @Summary 查询所有租户 @Description 查询所有租户 @Tags 租户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Success 200 {object} apipb.QueryTenantResponse @Router /api/core/auth/tenant/all [get]
func GetAllTitle ¶
func GetAllUsers ¶ added in v1.0.13
GetAllUsers @Summary 查询所有用户 @Description 查询所有用户 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param type query int false "用户类型,从1开始,为0时查询全部" @Param tenantID query string false "租户ID" @Param group query string false "分组ID,例如属于某个组织的,或者某个个人" @Success 200 {object} apipb.GetAllUsersResponse @Router /api/core/auth/user/all [get]
func GetMenuDetail ¶
GetMenuDetail @Summary 查询明细 @Description 查询明细 @Tags 菜单管理 @Accept json @Produce json @Param id query string true "ID" @Param authorization header string true "jwt token" @Success 200 {object} apipb.GetMenuDetailResponse @Router /api/core/auth/menu/detail [get]
func GetMenuTree ¶
GetMenuTree @Summary 查询所有菜单(Tree) @Description 查询所有菜单(Tree) @Tags 菜单管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Success 200 {object} apipb.QueryMenuResponse @Router /api/core/auth/menu/all [get]
func GetRoleDetail ¶
GetRoleDetail @Summary 查询明细 @Description 查询明细 @Tags 角色管理 @Accept json @Produce json @Param id query string true "ID" @Param authorization header string true "jwt token" @Success 200 {object} apipb.GetRoleDetailResponse @Router /api/core/auth/role/detail [get]
func GetTenantDetail ¶
GetTenantDetail @Summary 查询明细 @Description 查询明细 @Tags 租户管理 @Accept json @Produce json @Param id query string true "ID" @Param authorization header string true "jwt token" @Success 200 {object} apipb.GetTenantDetailResponse @Router /api/core/auth/tenant/detail [get]
func GetTitleDetail ¶
func GetUserDetail ¶
GetUserDetail @Summary 查询明细 @Description 查询明细 @Tags 用户管理 @Accept json @Produce json @Param id query string true "用户ID" @Param authorization header string true "jwt token" @Success 200 {object} apipb.GetUserDetailResponse @Router /api/core/auth/user/detail [get]
func Login ¶
Login @Summary 登录 @Description 登录 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "Bearer+空格+Token" @Param product body apipb.LoginRequest true "个人信息" @Success 200 {object} apipb.LoginResponse @Router /api/core/auth/user/login [post]
func Logout ¶
Logout @Summary 退出登录 @Description 退出登录 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/logout [post]
func Profile ¶
UpdateProfile @Summary 获取个人信息 @Description 获取个人信息 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "Bearer+空格+Token" @Success 200 {object} apipb.UserProfile @Router /api/core/auth/user/profile [get]
func QueryAPI ¶
QueryAPI godoc @Summary 分页查询 @Description 分页查询 @Tags API管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param pageIndex query int false "从1开始" @Param pageSize query int false "默认每页10条" @Param orderField query string false "排序字段" @Param desc query bool false "是否倒序排序" @Param path query string false "路径" @Param method query string false "方法" @Param group query string false "分组" @Param checkAuth query string false "是否检查权限" @Param checkLogin query string false "是否需要登录" @Success 200 {object} apipb.QueryAPIResponse @Router /api/core/auth/api/query [get]
func QueryMenu ¶
QueryMenu @Summary 分页查询 @Description 分页查询 @Tags 菜单管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param pageIndex query int false "从1开始" @Param pageSize query int false "默认每页10条" @Param orderField query string false "排序字段" @Param desc query bool false "是否倒序排序" @Param path query string false "路径" @Param name query string false "名称" @Param title query string false "显示名称" @Param parentID query string false "父ID" @Param level query int false "层级" @Success 200 {object} apipb.QueryMenuResponse @Router /api/core/auth/menu/query [get]
func QueryRole ¶
QueryRole @Summary 分页查询 @Description 分页查询 @Tags 角色管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param pageIndex query int false "从1开始" @Param pageSize query int false "默认每页10条" @Param orderField query string false "排序字段" @Param desc query bool false "是否倒序排序" @Param tenantID query string false "租户ID" @Param name query string false "名称" @Success 200 {object} apipb.QueryRoleResponse @Router /api/core/auth/role/query [get]
func QueryTenant ¶
QueryTenant @Summary 分页查询 @Description 分页查询 @Tags 租户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param pageIndex query int false "从1开始" @Param pageSize query int false "默认每页10条" @Param orderField query string false "排序字段" @Param desc query bool false "是否倒序排序" @Param tenantID query string false "租户ID" @Param name query string false "名称" @Success 200 {object} apipb.QueryTenantResponse @Router /api/core/auth/tenant/query [get]
func QueryTitle ¶
func QueryUser ¶
QueryUser @Summary 分页查询 @Description 分页查询 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param pageIndex query int false "从1开始" @Param pageSize query int false "默认每页10条" @Param orderField query string false "排序字段" @Param desc query bool false "是否倒序排序" @Param userName query string false "用户名" @Param nickname query string false "昵称" @Param idCard query string false "身份证号" @Param mobile query string false "手机号" @Param title query string false "职位" @Param type query int false "用户类型,从1开始,为0时查询全部" @Param tenantID query string false "租户ID" @Param group query string false "分组ID,例如属于某个组织的,或者某个个人" @Success 200 {object} apipb.QueryUserResponse @Router /api/core/auth/user/query [get]
func RegisterAuthRouter ¶
func RegisterTenantRouter ¶
func RegisterWechatRouter ¶ added in v1.2.0
func ResetPwd ¶
ResetPwd @Summary 重置密码 @Description 重置密码 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.GetDetailRequest true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/resetpwd [post]
func UpdateAPI ¶
UpdateAPI godoc @Summary 更新API @Description 更新API @Tags API管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.APIInfo true "Update API" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/api/update [put]
func UpdateMenu ¶
UpdateMenu @Summary 更新菜单 @Description 更新菜单 @Tags 菜单管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.MenuInfo true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/menu/update [put]
func UpdateProfile ¶ added in v1.0.16
UpdateProfile @Summary 更新个人信息 @Description 更新个人信息 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "Bearer+空格+Token" @Param product body apipb.UserProfile true "个人信息" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/profile [put]
func UpdateRole ¶
UpdateRole @Summary 更新角色 @Description 更新角色 @Tags 角色管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.RoleInfo true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/role/update [put]
func UpdateTenant ¶
UpdateTenant @Summary 更新租户 @Description 更新租户 @Tags 租户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.TenantInfo true "请求参数" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/tenant/update [put]
func UpdateTitle ¶
func UpdateUser ¶
UpdateUser @Summary 更新用户 @Description 更新用户 @Tags 用户管理 @Accept json @Produce json @Param authorization header string true "jwt token" @Param account body apipb.UserInfo true "用户信息" @Success 200 {object} apipb.CommonResponse @Router /api/core/auth/user/update [put]
func WechatNotify ¶ added in v1.2.0
/api/wechat/notify?signature=779ee239e53c506537b56e530cd96bd5869c890a&echostr=7007211687744363958×tamp=1632722226&nonce=1266362590