Documentation ¶
Index ¶
- func Index(c *gin.Context)
- type Captcha
- type Config
- type DBColumn
- type DBTable
- type Dept
- type DictData
- type DictType
- type FileDir
- type FileInfo
- type FileResponse
- type Generate
- type Login
- type LoginLog
- type Menu
- func (d *Menu) Create(c *gin.Context)
- func (d *Menu) Delete(c *gin.Context)
- func (d *Menu) Get(c *gin.Context)
- func (d *Menu) GetLeftMenu(c *gin.Context)
- func (d *Menu) GetTreeWithRole(c *gin.Context)
- func (d *Menu) Query(c *gin.Context)
- func (d *Menu) TreeMenu(c *gin.Context)
- func (d *Menu) Update(c *gin.Context)
- type Monitor
- type OperLog
- type Post
- type Role
- type RoleMenu
- type Setting
- type Tables
- type Upload
- type User
- func (d *User) Create(c *gin.Context)
- func (d *User) Delete(c *gin.Context)
- func (d *User) Get(c *gin.Context)
- func (d *User) GetProfile(c *gin.Context)
- func (d *User) GetUserInit(c *gin.Context)
- func (d *User) Query(c *gin.Context)
- func (d *User) Update(c *gin.Context)
- func (d *User) UpdateAvatar(c *gin.Context)
- func (d *User) UpdatePassword(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
Config 字典数据管理
func (*Config) Create ¶
Create 创建数据 @Tags 参数设置 @Security Bearer @Summary 添加参数信息 @Param body body model.Config true "参数信息" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/config [post]
func (*Config) Delete ¶
Delete 删除数据 @Tags 参数设置 @Security Bearer @Summary 删除参数信息 @Param id path string true "id" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/config/{id} [delete]
func (*Config) Get ¶
Get 查询指定数据 @Tags 参数设置 @Security Bearer @Summary 通过ID获取参数信息 @Param id path int true "参数ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/config/{id} [get]
func (*Config) GetWithKey ¶
GetWithKey 查询指定类型数据 @Tags 参数设置 @Security Bearer @Summary 通过key值获取参数信息 @Param configName path int true "参数键值" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/config_key [get]
func (*Config) Query ¶
Query 查询数据 @Tags 参数设置 @Security Bearer @Summary 参数列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param configName query string false "configName" @Param configKey query string false "configKey" @Param configType query string false "configType" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/config [get]
type DBColumn ¶
DBColumn 数据库列管理
func (*DBColumn) Query ¶
Query 查询数据 @Tags 工具 @Security Bearer @Summary 分页列表数据 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param tableName query string false "数据表名称" @Success 200 {string} string "{code: 200, data: [...]}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/db/columns [get]
type DBTable ¶
DBTable 数据库表管理
func (*DBTable) Query ¶
Query 查询数据 @Tags 工具 @Security Bearer @Summary 数据库表分页列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param tableName query string false "数据表名称" @Success 200 {string} string "{code: 200, data: [...]}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/db/tables [get]
type Dept ¶
Dept 字典数据管理
func (*Dept) Create ¶
Create 创建数据 @Tags 部门 @Security Bearer @Summary 添加部门 @Param body body model.Dept true "部门信息" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/depts [post]
func (*Dept) Delete ¶
Delete 删除数据 @Tags 部门 @Security Bearer @Summary 删除部门 @Param id path string true "id" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/depts/{id} [delete]
func (*Dept) Get ¶
Get 查询指定数据 @Tags 部门 @Security Bearer @Summary 通过ID获取部门信息 @Param id path int true "部门ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/depts/{id} [get]
func (*Dept) GetDeptTree ¶
GetDeptTree 部门树 @Tags 部门 @Security Bearer @Summary 查看部门树数据 @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/dept_tree [get]
func (*Dept) GetDeptTreeWithRole ¶
GetDeptTreeWithRole 角色部门树 @Tags 部门 @Security Bearer @Summary 查看角色部门树数据 @Param id path string true "角色ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/role_dept_treeselect/:id [get]
func (*Dept) Query ¶
Query 查询数据 @Tags 部门 @Security Bearer @Summary 部门列表数据 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param deptName query string false "部门名称" @Param status query string false "status" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/depts [get]
type DictData ¶
DictData 字典数据管理
func (*DictData) Create ¶
Create 创建数据 @Tags 字典数据 @Security Bearer @Summary 添加字典数据 @Param body body model.DictData true "字典数据" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/dicts [post]
func (*DictData) Delete ¶
Delete 删除数据 @Tags 字典数据 @Security Bearer @Summary 删除字典数据 @Param id path string true "id" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/dicts/{id} [delete]
func (*DictData) Get ¶
Get 查询指定数据 @Tags 字典数据 @Security Bearer @Summary 通过编码获取字典数据 @Param id path int true "字典编码" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/dicts/{id} [get]
func (*DictData) GetWithType ¶
GetWithType 查询指定类型数据 @Tags 字典数据 @Security Bearer @Summary 通过字典类型获取字典数据 @Param type path int true "字典类型" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/dict_datas/{type} [get]
func (*DictData) Query ¶
Query 查询数据 @Tags 字典数据 @Security Bearer @Summary 字典数据列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param status query string false "status" @Param id query string false "字典码" @Param dictType query string false "字典类型" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/dicts [get]
type DictType ¶
DictType 字典类型管理
func (*DictType) Create ¶
Create 创建数据 @Tags 字典类型 @Security Bearer @Summary 添加字典类型 @Param body body model.DictType true "字典类型" @Success 200 {string} string "{code: 200, msg: 添加成功}" @Failure 200 {string} string "{code: -1, msg: 添加失败}" @Router /api/v1/dict_types [post]
func (*DictType) Delete ¶
Delete 删除数据 @Tags 字典类型 @Security Bearer @Summary 删除字典类型 @Param id path string true "字典ID" @Success 200 {string} string "{code: 200, msg: 删除成功}" @Failure 200 {string} string "{code: -1, msg: 删除失败}" @Router /api/v1/dict_types/{id} [delete]
func (*DictType) Get ¶
Get 查询指定数据 @Tags 字典类型 @Security Bearer @Summary 通过字典ID获取字典类型 @Param id path int true "字典类型编码" @Success 200 {string} string "{code: 200, data: {}}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/dict_types/{id} [get]
func (*DictType) GetWithOptionSelect ¶
GetWithOptionSelect 查询选择项数据 @Tags 字典类型 @Security Bearer @Summary 通过字典类型获取选择项数据 @Param id path int true "字典类型ID" @Query name query string false "字典类型名称" @Success 200 {string} string "{code: 200, data: {}}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/dict_options/{id} [get]
func (*DictType) Query ¶
Query 查询数据 @Tags 字典类型 @Security Bearer @Summary 字典类型列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param name query string false "字典名称" @Param type query string false "字典类型" @Success 200 {string} string "{code: 200, data: [...]}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/dict_types [get]
type FileDir ¶
FileDir 文件夹管理
func (*FileDir) Create ¶
Create 创建数据 @Tags 文件夹 @Security Bearer @Summary 添加文件夹数据 @Param body body model.FileDir true "文件夹信息" @Success 200 {string} string "{code: 200, msg: 添加成功}" @Failure 200 {string} string "{code: -1, msg: 添加失败}" @Router /api/v1/file_dirs [post]
func (*FileDir) Delete ¶
Delete 删除数据 @Tags 文件夹 @Security Bearer @Summary 删除文件夹信息 @Param id path string true "文件夹ID"" @Success 200 {string} string "{code: 200, msg: 删除成功}" @Failure 200 {string} string "{code: -1, msg: 删除失败}" @Router /api/v1/file_dirs/{id} [delete]
func (*FileDir) Get ¶
Get 查询指定数据 @Tags 文件夹 @Security Bearer @Summary 通过ID取文件夹信息 @Param id path int true "文件夹ID" @Success 200 {string} string "{code: 200, data: {}}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/file_dirs/{id} [get]
func (*FileDir) Query ¶
Query 查询数据 @Tags 文件夹 @Security Bearer @Summary 文件夹列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param id query string false "id" @Param pid query string false "pid" @Success 200 {string} string "{code: 200, data: [...]}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/file_dirs [get]
type FileInfo ¶
FileInfo 文件信息管理
func (*FileInfo) Create ¶
Create 创建数据 @Tags 文件信息 @Security Bearer @Summary 添加文件信息 @Param body body model.FileInfo true "文件信息" @Success 200 {string} string "{code: 200, msg: 添加成功}" @Failure 200 {string} string "{code: -1, msg: 添加失败}" @Router /api/v1/file_infos [post]
func (*FileInfo) Delete ¶
Delete 删除数据 @Tags 文件信息 @Security Bearer @Summary 删除文件信息 @Param id path string true "id" @Success 200 {string} string "{code: 200, msg: 删除成功}" @Failure 200 {string} string "{code: -1, msg: 删除失败}" @Router /api/v1/file_infos/{id} [delete]
func (*FileInfo) Get ¶
Get 查询指定数据 @Tags 文件信息 @Security Bearer @Summary 通过编码获取字典数据 @Param id path int true "文件ID" @Success 200 {string} string "{code: 200, data: {}}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/file_infos/{id} [get]
func (*FileInfo) Query ¶
Query 查询数据 @Tags 文件信息 @Security Bearer @Summary 文件信息列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param pId query string false "pId" @Success 200 {string} string "{code: 200, data: [...]}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/file_infos [get]
type FileResponse ¶
type FileResponse struct { Size int64 `json:"size"` Path string `json:"path"` FullPath string `json:"full_path"` Name string `json:"name"` Type string `json:"type"` }
FileResponse 文件返回内容
type Generate ¶
type Generate struct { GenerateService *service.Generate TableService *service.Tables ColumnService *service.Column }
Generate 生成
func (*Generate) GenCode ¶
GenCode 生成代码 @Tags 工具 @Security Bearer @Summary 生成代码信息 @Param id path int true "表ID" @Success 200 {string} string "{code: 200, msg: 更新成功}" @Failure 200 {string} string "{code: -1, msg: 更新失败}" @Router /api/v1/gen/toproject/:id [get]
type Login ¶
type Login struct { Auth auth.Auther UserService *service.User RoleMenuService *service.RoleMenu LoginLogService *service.LoginLog }
Login 登录管理
func (*Login) GetUserInfo ¶
GetUserInfo 获取当前用户信息 @Tags 登录管理 @Summary 获取当前用户信息 @Security Bearer @Success 200 {object} ginx.Response @Failure 401 {object} ginx.Response "{error:{code:0,message:未授权}}" @Failure 500 {object} ginx.Response "{error:{code:0,message:服务器错误}}" @Router /api/v1/getinfo [get]
func (*Login) LogOut ¶
LogOut 退出系统 @Tags 登录管理 @Summary 退出登录 @Security Bearer @Success 200 {object} ginx.Response "{code:200,msg:成功退出系统}" @Failure 400 {object} ginx.Response "{code:-1,msg:退出系统失败}" @Router /api/v1/logout [post]
func (*Login) Login ¶
Login 登陆 @Tags 登录管理 @Summary 系统登录 @Param body body param.LoginParam true "登录参数" @Success 200 {string} string "{"code": 200, "expire": "2019-08-07T12:45:48+08:00", "token": ".eyJleHAiOjE1NjUxNTMxNDgsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTU2NTE0OTU0OH0.-zvzHvbg0A" }" @Failure 400 {object} ginx.Response "{code:-1, msg:登录失败}" @Router /login [post]
func (*Login) RefreshToken ¶
RefreshToken 刷新Token @Tags 登录管理 @Summary 刷新认证Token @Security Bearer @Success 200 {object} ginx.Response "{code:200,msg:刷新成功}" @Failure 400 {object} ginx.Response "{code:-1,msg:刷新失败}" @Router /api/v1/refresh_token [get]
type LoginLog ¶
LoginLog 登录日志管理
func (*LoginLog) Create ¶
Create 创建数据 @Tags 登录日志 @Security Bearer @Summary 添加登录日志 @Param body body model.LoginLog true "登录日志信息" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/loginlogs [post]
func (*LoginLog) Delete ¶
Delete 删除数据 @Tags 登录日志 @Security Bearer @Summary 删除登录日志 @Param id path string true "日志ID" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/loginlogs/{id} [delete]
func (*LoginLog) Get ¶
Get 查询指定数据 @Tags 登录日志 @Security Bearer @Summary 通过ID获取登录日志 @Param id path int true "登录日志ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/loginlogs/{id} [get]
func (*LoginLog) Query ¶
Query 查询数据 @Tags 登录日志 @Security Bearer @Summary 登录日志列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param status query string false "status" @Param userName query string false "username" @Param ipAddr query string false "ipaddr" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/loginlogs [get]
type Menu ¶
Menu 菜单管理
func (*Menu) Create ¶
Create 创建数据 @Tags 菜单 @Security ApiKeyAuth @Summary 添加菜单数据 @Param body body model.Menu true "菜单数据" @Success 200 {object} ginx.Response "{code: 200, msg: 添加成功}" @Failure 400 {object} ginx.Response "{code: -1, msg: 添加失败}" @Router /api/v1/menus [post]
func (*Menu) Delete ¶
Delete 删除数据 @Tags 菜单 @Security ApiKeyAuth @Summary 删除菜单数据 @Param id path string true "菜单ID" @Success 200 {object} ginx.Response "{code: 200, msg: 删除成功}" @Failure 400 {object} ginx.Response "{code: -1, msg: 删除失败}" @Router /api/v1/menus/{id} [delete]
func (*Menu) Get ¶
Get 查询指定数据 @Tags 菜单 @Security ApiKeyAuth @Summary 通过菜单ID获取菜单数据 @Param id query string false "菜单ID" @Success 200 {object} ginx.Response{data=model.Menu} "菜单详情" @Failure 400 {object} ginx.Response "{code:-1, msg:错误信息}" @Router /api/v1/menus/{id} [get]
func (*Menu) GetLeftMenu ¶
GetLeftMenu 查询左侧菜单 @Tags 菜单 @Security ApiKeyAuth @Summary 根据角色名称获取菜单列表数据(左菜单使用) @Success 200 {object} ginx.Response{data=[]model.Menu} @Failure 400 {object} ginx.Response "{code:-1, msg:错误信息}" @Router /api/v1/menu_role [get]
func (*Menu) GetTreeWithRole ¶
GetTreeWithRole 查询角色菜单树数据 @Tags 菜单 @Security ApiKeyAuth @Summary 查询角色菜单树数据 @Param id path int true "角色ID" @Success 200 {object} ginx.Response "{code:200, data:{}}" @Failure 400 {object} ginx.Response "{code:-1, msg:错误信息}" @Router /api/v1/role_menu_treeselect/:id [get]
func (*Menu) Query ¶
Query 查询数据 @Tags 菜单 @Security ApiKeyAuth @Summary 菜单数据列表 @Param title query string false "title" @Param visible query string false "visible" @Param menu_name query string false "菜单名称" @Success 200 {object} ginx.Response{data=[]model.Menu} "查询结果" @Failure 400 {object} ginx.Response "{"code":-1,"msg":"错误信息"}" @Router /api/v1/menus [get]
func (*Menu) TreeMenu ¶
TreeMenu 菜单树 @Tags 菜单 @Security ApiKeyAuth @Summary 获取菜单树 @Success 200 {object} ginx.Response "{code: 200, data: {}}" @Failure 400 {object} ginx.Response "{code:-1, msg:错误信息}" @Router /api/v1/menu_treeselect [get]
type Monitor ¶
Monitor 监控管理
func (*Monitor) ServerInfo ¶
ServerInfo 系统信息 @Tags 系统信息 @Security Bearer @Summary 查看系统信息 @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/settings/server_info [get]
type OperLog ¶
OperLog 操作日志管理
func (*OperLog) Create ¶
Create 创建数据 @Tags 操作日志 @Security Bearer @Summary 添加操作日志 @Param body body model.OperLog true "操作日志" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/operlogs [post]
func (*OperLog) Delete ¶
Delete 删除数据 @Tags 操作日志 @Security Bearer @Summary 删除操作日志 @Param id path string true "以逗号(,)分割的id" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/operlogs/{id} [delete]
func (*OperLog) Get ¶
Get 查询指定数据 @Tags 操作日志 @Security Bearer @Summary 通过ID获取操作日志 @Param id path int true "日志ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/operlogs/{id} [get]
func (*OperLog) Query ¶
Query 查询数据 @Tags 操作日志 @Security Bearer @Summary 操作日志列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param status query string false "状态" @Param operName query string false "操作人" @Param operIp query string false "操作IP" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/operlogs [get]
type Post ¶
Post 岗位管理
func (*Post) Create ¶
Create 创建数据 @Tags 岗位 @Security Bearer @Summary 添加岗位 @Param body body model.Post true "岗位信息" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/posts [post]
func (*Post) Delete ¶
Delete 删除数据 @Tags 岗位 @Security Bearer @Summary 删除岗位信息 @Param id path string true "职务ID" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/posts/{id} [delete]
func (*Post) Get ¶
Get 查询指定数据 @Tags 岗位 @Security Bearer @Summary 获取岗位信息 @Param id path int true "岗位ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/posts/{id} [get]
func (*Post) Query ¶
Query 查询数据 @Tags 岗位 @Security Bearer @Summary 岗位列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param postName query string false "岗位名称" @Param postCode query string false "岗位编码" @Param status query string false "status" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/posts [get]
type Role ¶
Role 角色管理
func (*Role) Create ¶
Create 创建数据 @Tags 角色 @Security Bearer @Summary 创建角色 @Param body body model.Role true "角色信息" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/roles [post]
func (*Role) Delete ¶
Delete 删除数据 @Tags 角色 @Security Bearer @Summary 删除角色数据 @Param id path int true "角色ID" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/roles/{id} [delete]
func (*Role) Get ¶
Get 查询指定数据 @Tags 角色 @Security Bearer @Summary 通过角色ID获取角色数据 @Param id path string false "角色ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/roles/{id} [get]
func (*Role) Query ¶
Query 查询数据 @Tags 角色 @Security Bearer @Summary 角色列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param rolName query string false "角色名称" @Param status query string false "status" @Param roleKey query string false "角色key" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/roles [get]
func (*Role) Update ¶
Update 更新数据 @Tags 角色 @Security Bearer @Summary 更新角色信息 @Param body body model.Role true "角色信息" @Success 200 string string "{code: 200, msg: 更新成功}" @Failure 200 string string "{code: -1, msg: 更新失败}" @Router /api/v1/roles [put]
func (*Role) UpdateDataScope ¶
UpdateDataScope 更新数据权限 @Tags 角色 @Security Bearer @Summary 更新数据权限 @Param body body model.Role true "角色信息" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/roles/datascope [put]
type RoleMenu ¶
RoleMenu 角色菜单
func (*RoleMenu) DeleteRoleMenu ¶
DeleteRoleMenu 删除角色菜单信息 @Tags 角色菜单 @Security Bearer @Summary 删除数据角色菜单数据 @Param id path string true "角色ID" @Param menu_id query string false "菜单ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/rolemenu/{id} [delete]
func (*RoleMenu) GetRoleMenu ¶
GetRoleMenu 获取角色菜单信息 @Tags 角色菜单 @Security Bearer @Summary 角色菜单列表数据 @Param id query string false "角色ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/rolemenu [get]
type Setting ¶
Setting 设置管理
type Tables ¶
Tables 字典数据管理
func (*Tables) Create ¶
Create 创建数据 @Tags 工具 @Security Bearer @Summary 添加表结构 @Param body body model.Tables true "结构数据" @Success 200 {string} string "{code: 200, msg: 添加成功}" @Failure 200 {string} string "{code: -1, msg: 添加失败}" @Router /api/v1/sys/tables [post]
func (*Tables) Delete ¶
Delete 删除数据 @Tags 工具 @Security Bearer @Summary 删除表结构 @Param id path string true "表ID" @Success 200 {string} string "{code: 200, msg: 删除成功}" @Failure 200 {string} string "{code: -1, msg: 删除失败}" @Router /api/v1/sys/tables/{id} [delete]
func (*Tables) Get ¶
Get 查询指定数据 @Tags 工具 @Security Bearer @Summary 通过编码获取字典数据 @Param id path int true "表ID" @Success 200 {string} string "{code: 200, data: {}}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/sys/tables/{id} [get]
func (*Tables) GetInfo ¶
GetInfo 获取表信息 @Tags 工具 @Security Bearer @Summary 通过表名获取表数据 @Param table_name query int true "表名称" @Success 200 {string} string "{code: 200, data: {}}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/sys/table_info [get]
func (*Tables) Query ¶
Query 查询数据 @Tags 工具 @Security Bearer @Summary 生成表分页列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param tableName query string false "数据表名称" @Param tableComment query string false "数据表注释(说明)" @Success 200 {string} string "{code: 200, data: [...]}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/sys/tables [get]
type Upload ¶
type Upload struct { }
Upload 上传
func (*Upload) UploadFile ¶
@Summary 上传图片 @Description 获取JSON @Tags 公共接口 @Accept multipart/form-data @Param type query string true "type" (1:单图,2:多图, 3:base64图片) @Param file formData file true "file" @Success 200 {string} string "{"code": 200, "message": "添加成功"}" @Success 200 {string} string "{"code": -1, "message": "添加失败"}" @Router /api/v1/public/upload_file [post]
type User ¶
type User struct { UserService *service.User RoleService *service.Role PostService *service.Post DeptService *service.Dept }
User 系统用户管理
func (*User) Create ¶
Create 创建数据 @Tags 系统用户 @Security Bearer @Summary 添加用户数据 @Param body body model.User true "用户数据" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/sys_users [post]
func (*User) Delete ¶
Delete 删除数据 @Tags 系统用户 @Security Bearer @Summary 删除用户数据 @Param id path int true "id" @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/sys_users/{id} [delete]
func (*User) Get ¶
Get 查询指定数据 @Tags 系统用户 @Security Bearer @Summary 通过用户ID查询用户信息,待优化 @Param id path int true "用户ID" @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/sys_users/{id} [get]
func (*User) GetProfile ¶
GetProfile 个人中心数据 @Tags 系统用户 @Security Bearer @Summary 获取个人中心用户,待优化 @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/user/profile [get]
func (*User) GetUserInit ¶
GetUserInit 用户角色和职位数据 @Tags 系统用户 @Security Bearer @Summary 获取用户角色和职位 @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/sys_users [get]
func (*User) Query ¶
Query 查询数据 @Tags 系统用户 @Security Bearer @Summary 用户信息列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param username query string false "用户名" @Param status query string false "状态" @Param phone query string false "手机号" @Param postId query int false "岗位ID" @Param deptId query int false "部门ID" @Success 200 string string "{code: 200, data: [...]}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/sys_user_list [get]
func (*User) Update ¶
Update 更新数据 @Tags 系统用户 @Security Bearer @Summary 更新用户数据 @Param body body model.User true "用户数据" @Success 200 string string "{code: 200, msg: 更新成功}" @Failure 200 string string "{code: -1, msg: 更新失败}" @Router /api/v1/sys_users [put]
func (*User) UpdateAvatar ¶
UpdateAvatar 修改头像 @Tags 系统用户 @Security Bearer @Summary 修改用户头像数据 @Param file formData file true "file" @Success 200 string string "{code: 200, msg: 修改成功}" @Failure 200 string string "{code: -1, msg: 修改失败}" @Router /api/v1/user/avatar [post]
func (*User) UpdatePassword ¶
UpdatePassword 修改密码 @Tags 系统用户 @Security Bearer @Summary 修改用户密码 @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/user/pwd [put]