api

package
v2.0.37 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptchaHandler

func CaptchaHandler(c *gin.Context)

CaptchaHandler 验证码

func ConfigCreateHandler

func ConfigCreateHandler(c *gin.Context)

ConfigCreateHandler 创建数据 @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 ConfigDeleteHandler

func ConfigDeleteHandler(c *gin.Context)

ConfigDeleteHandler 删除数据 @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 ConfigGetHandler

func ConfigGetHandler(c *gin.Context)

ConfigGetHandler 查询指定数据 @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 ConfigGetWithKeyHandler

func ConfigGetWithKeyHandler(c *gin.Context)

ConfigGetWithKeyHandler 查询指定类型数据 @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 ConfigQueryHandler

func ConfigQueryHandler(c *gin.Context)

ConfigQueryHandler 查询数据 @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]

func ConfigUpdateHandler

func ConfigUpdateHandler(c *gin.Context)

ConfigUpdateHandler 更新数据 @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 [put]

func DBColumnQueryHandler

func DBColumnQueryHandler(c *gin.Context)

DBColumnQueryHandler 查询数据 @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]

func DBTableQueryHandler

func DBTableQueryHandler(c *gin.Context)

DBTableQueryHandler 查询数据 @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]

func DeptCreateHandler

func DeptCreateHandler(c *gin.Context)

DeptCreateHandler 创建数据 @Tags 部门 @Security Bearer @Summary 添加部门 @Param body body model.Dept true "部门信息" @Success 200 {object} ginx.Response "{code:200,msg:创建成功}" @Failure 400 {object} ginx.Response "{code:400,msg:创建失败}" @Router /api/v1/depts [post]

func DeptDeleteHandler

func DeptDeleteHandler(c *gin.Context)

DeptDeleteHandler 删除数据 @Tags 部门 @Security Bearer @Summary 删除部门 @Param id path string true "id" @Success 200 {object} ginx.Response "{code:200,msg:删除成功}" @Failure 400 {object} ginx.Response "{code:400,msg:删除失败}" @Router /api/v1/depts/{id} [delete]

func DeptGetDeptTreeHandler

func DeptGetDeptTreeHandler(c *gin.Context)

DeptGetDeptTreeHandler 部门树 @Tags 部门 @Security Bearer @Summary 查看部门树数据 @Success 200 {object} ginx.Response{data=[]param.Dept} "查询成功" @Failure 400 {object} ginx.Response "{code:400,msg:查询失败}" @Router /api/v1/dept_tree [get]

func DeptGetDeptTreeWithRoleHandler

func DeptGetDeptTreeWithRoleHandler(c *gin.Context)

DeptGetDeptTreeWithRoleHandler 角色部门树 @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 DeptGetHandler

func DeptGetHandler(c *gin.Context)

DeptGetHandler 查询指定数据 @Tags 部门 @Security Bearer @Summary 通过ID获取部门信息 @Param id path int true "部门ID" @Success 200 {object} ginx.Response{data=model.Dept} "查询成功" @Failure 400 {object} ginx.Response "{code:400,msg:查询失败}" @Router /api/v1/depts/{id} [get]

func DeptQueryHandler

func DeptQueryHandler(c *gin.Context)

DeptQueryHandler 查询数据 @Tags 部门 @Security Bearer @Summary 部门列表数据 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param name query string false "部门名称" @Param status query string false "status" @Success 200 {object} ginx.Response{data=[]model.Dept} "查询结果" @Failure 400 {object} ginx.Response "{code:400,msg:更新失败}" @Router /api/v1/depts [get]

func DeptUpdateHandler

func DeptUpdateHandler(c *gin.Context)

DeptUpdateHandler 更新数据 @Tags 部门 @Security Bearer @Summary 修改部门 @Param body body model.Dept true "部门信息" @Success 200 {object} ginx.Response "{code:200,msg:更新成功}" @Failure 400 {object} ginx.Response "{code:400,msg:更新失败}" @Router /api/v1/depts/{id} [put]

func DictDataCreateHandler

func DictDataCreateHandler(c *gin.Context)

DictDataCreateHandler 创建数据 @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 DictDataDeleteHandler

func DictDataDeleteHandler(c *gin.Context)

DictDataDeleteHandler 删除数据 @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 DictDataGetHandler

func DictDataGetHandler(c *gin.Context)

DictDataGetHandler 查询指定数据 @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 DictDataGetWithTypeHandler

func DictDataGetWithTypeHandler(c *gin.Context)

DictDataGetWithTypeHandler 查询指定类型数据 @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 DictDataQueryHandler

func DictDataQueryHandler(c *gin.Context)

DictDataQueryHandler 查询数据 @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]

func DictDataUpdateHandler

func DictDataUpdateHandler(c *gin.Context)

DictDataUpdateHandler 更新数据 @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 [put]

func DictTypeCreateHandler

func DictTypeCreateHandler(c *gin.Context)

DictTypeCreateHandler 创建数据 @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 DictTypeDeleteHandler

func DictTypeDeleteHandler(c *gin.Context)

DictTypeDeleteHandler 删除数据 @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 DictTypeGetHandler

func DictTypeGetHandler(c *gin.Context)

DictTypeGetHandler 查询指定数据 @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 DictTypeGetWithOptionSelectHandler

func DictTypeGetWithOptionSelectHandler(c *gin.Context)

DictTypeGetWithOptionSelectHandler 查询选择项数据 @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 DictTypeQueryHandler

func DictTypeQueryHandler(c *gin.Context)

DictTypeQueryHandler 查询数据 @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]

func DictTypeUpdateHandler

func DictTypeUpdateHandler(c *gin.Context)

DictTypeUpdateHandler 更新数据 @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 [put]

func FileDirCreateHandler

func FileDirCreateHandler(c *gin.Context)

FileDirCreateHandler 创建数据 @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 FileDirDeleteHandler

func FileDirDeleteHandler(c *gin.Context)

FileDirDeleteHandler 删除数据 @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 FileDirGetHandler

func FileDirGetHandler(c *gin.Context)

FileDirGetHandler 查询指定数据 @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 FileDirQueryHandler

func FileDirQueryHandler(c *gin.Context)

FileDirQueryHandler 查询数据 @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]

func FileDirUpdateHandler

func FileDirUpdateHandler(c *gin.Context)

FileDirUpdateHandler 更新数据 @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 [put]

func FileInfoCreateHandler

func FileInfoCreateHandler(c *gin.Context)

FileInfoCreateHandler 创建数据 @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 FileInfoDeleteHandler

func FileInfoDeleteHandler(c *gin.Context)

FileInfoDeleteHandler 删除数据 @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 FileInfoGetHandler

func FileInfoGetHandler(c *gin.Context)

FileInfoGetHandler 查询指定数据 @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 FileInfoQueryHandler

func FileInfoQueryHandler(c *gin.Context)

FileInfoQueryHandler 查询数据 @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]

func FileInfoUpdateHandler

func FileInfoUpdateHandler(c *gin.Context)

FileInfoUpdateHandler 更新数据 @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 [put]

func GenerateGenCodeHandler

func GenerateGenCodeHandler(c *gin.Context)

GenerateGenCodeHandler 生成代码 @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]

func GenerateGenConfigHandler

func GenerateGenConfigHandler(c *gin.Context)

GenerateGenConfigHandler 生成菜单和api配置 @Tags 工具 @Security Bearer @Summary 生成菜单和api配置信息 @Param id path int true "表ID" @Success 200 {string} string "{code: 200, msg: 更新成功}" @Failure 200 {string} string "{code: -1, msg: 更新失败}" @Router /api/v1/gen/todb/:id [get]

func GeneratePreviewHandler

func GeneratePreviewHandler(c *gin.Context)

GeneratePreviewHandler 预览 @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/preview/:id [get]

func GetUserInfoHandler

func GetUserInfoHandler(auth auth.Auther) gin.HandlerFunc

GetUserInfoHandler 获取当前用户信息 @Tags 登录管理 @Summary 获取当前用户信息 @Security Bearer @Success 200 {object} ginx.Response{data=param.UserLoginInfo} "用户信息" @Failure 401 {object} ginx.Response "{error:{code:0,message:未授权}}" @Failure 500 {object} ginx.Response "{error:{code:0,message:服务器错误}}" @Router /api/v1/getinfo [get]

func Index

func Index(c *gin.Context)

Index 默认首页

func LogOutHandler

func LogOutHandler(auth auth.Auther) gin.HandlerFunc

LogOutHandler 退出系统 @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 LoginHandler

func LoginHandler(au auth.Auther) gin.HandlerFunc

LoginHandler 登陆 @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 LoginLogCreateHandler

func LoginLogCreateHandler(c *gin.Context)

LoginLogCreateHandler 创建数据 @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 LoginLogDeleteHandler

func LoginLogDeleteHandler(c *gin.Context)

LoginLogDeleteHandler 删除数据 @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 LoginLogGetHandler

func LoginLogGetHandler(c *gin.Context)

LoginLogGetHandler 查询指定数据 @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 LoginLogQueryHandler

func LoginLogQueryHandler(c *gin.Context)

LoginLogQueryHandler 查询数据 @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]

func LoginLogUpdateHandler

func LoginLogUpdateHandler(c *gin.Context)

LoginLogUpdateHandler 更新数据 @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 [put]

func MenuCreateHandler(c *gin.Context)

MenuCreateHandler 创建数据 @Tags 菜单 @Security ApiKeyAuth @Summary 添加菜单数据 @Param body body param.Menu true "菜单数据" @Success 200 {object} ginx.Response "{code: 200, msg: 添加成功}" @Failure 400 {object} ginx.Response "{code: -1, msg: 添加失败}" @Router /api/v1/menus [post]

func MenuDeleteHandler(c *gin.Context)

MenuDeleteHandler 删除数据 @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 MenuGetHandler(c *gin.Context)

MenuGetHandler 查询指定数据 @Tags 菜单 @Security ApiKeyAuth @Summary 通过菜单ID获取菜单数据 @Param id query string false "菜单ID" @Success 200 {object} ginx.Response{data=param.Menu} "菜单详情" @Failure 400 {object} ginx.Response "{code:-1, msg:错误信息}" @Router /api/v1/menus/{id} [get]

func MenuMenusResourcesTreeHandler(c *gin.Context)

MenuMenusResourcesTreeHandler 资源(权限)树 @Tags 菜单 @Security ApiKeyAuth @Summary 获取资源(权限)树 @Success 200 {object} ginx.Response{data=[]param.MenuAccessResourceTrees} "资源(权限)树" @Failure 400 {object} ginx.Response "{code:-1, msg:错误信息}" @Router /api/v1/menus_resource [get]

func MenuMenusTreeHandler(c *gin.Context)

MenuMenusTreeHandler 菜单树 @Tags 菜单 @Security ApiKeyAuth @Summary 获取菜单树 @Success 200 {object} ginx.Response{data=[]param.MenuTrees} "查询结果" @Failure 400 {object} ginx.Response "{code:-1, msg:错误信息}" @Router /api/v1/menus_tree [get]

func MenuQueryHandler(c *gin.Context)

MenuQueryHandler 查询数据 @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=[]param.MenuTrees} "查询结果" @Failure 400 {object} ginx.Response "{"code":-1,"msg":"错误信息"}" @Router /api/v1/menus [get]

func MenuUpdateHandler(c *gin.Context)

MenuUpdateHandler 更新数据 @Tags 菜单 @Security ApiKeyAuth @Summary 更新菜单数据 @Param body body param.Menu true "更新菜单" @Success 200 {object} ginx.Response "{code: 200, msg: 更新成功}" @Failure 400 {object} ginx.Response "{code: -1, msg: 更新失败}" @Router /api/v1/menus/{id} [put]

func MonitorServerInfoHandler

func MonitorServerInfoHandler(c *gin.Context)

MonitorServerInfoHandler 系统信息 @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]

func OperLogCreateHandler

func OperLogCreateHandler(c *gin.Context)

OperLogCreateHandler 创建数据 @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 OperLogDeleteHandler

func OperLogDeleteHandler(c *gin.Context)

OperLogDeleteHandler 删除数据 @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 OperLogGetHandler

func OperLogGetHandler(c *gin.Context)

OperLogGetHandler 查询指定数据 @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 OperLogQueryHandler

func OperLogQueryHandler(c *gin.Context)

OperLogQueryHandler 查询数据 @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]

func PostCreateHandler

func PostCreateHandler(c *gin.Context)

PostCreateHandler 创建数据 @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 PostDeleteHandler

func PostDeleteHandler(c *gin.Context)

PostDeleteHandler 删除数据 @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 PostGetHandler

func PostGetHandler(c *gin.Context)

PostGetHandler 查询指定数据 @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 PostQueryHandler

func PostQueryHandler(c *gin.Context)

PostQueryHandler 查询数据 @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]

func PostUpdateHandler

func PostUpdateHandler(c *gin.Context)

PostUpdateHandler 更新数据 @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 [put]

func RefreshTokenHandler

func RefreshTokenHandler(au auth.Auther) gin.HandlerFunc

RefreshTokenHandler 刷新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]

func RoleCreateHandler

func RoleCreateHandler(e *casbin.SyncedEnforcer) gin.HandlerFunc

RoleCreateHandler 创建数据 @Tags 角色 @Security Bearer @Summary 创建角色 @Param body body param.Role true "角色信息" @Success 200 string string "{code:200, msg:成功}" @Failure 400 string string "{code:-1, msg:错误信息}" @Router /api/v1/roles [post]

func RoleDeleteHandler

func RoleDeleteHandler(e *casbin.SyncedEnforcer) gin.HandlerFunc

RoleDeleteHandler 删除数据 @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 RoleGetHandler

func RoleGetHandler(e *casbin.SyncedEnforcer) gin.HandlerFunc

RoleGetHandler 查询指定数据 @Tags 角色 @Security Bearer @Summary 通过角色ID获取角色数据 @Param id path string false "角色ID" @Success 200 {object} ginx.Response{data=param.Role} "角色详情" @Failure 400 {object} ginx.Response @Router /api/v1/roles/{id} [get]

func RoleQueryHandler

func RoleQueryHandler(e *casbin.SyncedEnforcer) gin.HandlerFunc

RoleQueryHandler 查询数据 @Tags 角色 @Security Bearer @Summary 角色列表 @Param pageIndex query int true "分页索引" default(1) @Param pageSize query int true "分页大小" default(10) @Param name query string false "角色名称" @Param status query string false "status" @Success 200 {object} ginx.Response{data=[]param.Role} "角色列表" @Failure 400 {object} ginx.Response @Router /api/v1/roles [get]

func RoleUpdateDataScopeHandler

func RoleUpdateDataScopeHandler(e *casbin.SyncedEnforcer) gin.HandlerFunc

RoleUpdateDataScopeHandler 更新数据权限 @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]

func RoleUpdateHandler

func RoleUpdateHandler(e *casbin.SyncedEnforcer) gin.HandlerFunc

RoleUpdateHandler 更新数据 @Tags 角色 @Security Bearer @Summary 更新角色信息 @Param body body param.Role true "角色信息" @Success 200 string string "{code: 200, msg: 更新成功}" @Failure 200 string string "{code: -1, msg: 更新失败}" @Router /api/v1/roles/{id} [put]

func SendSmsHandler added in v2.0.14

func SendSmsHandler(c *gin.Context)

SendSmsHandler 发送验证码 @Tags 登录管理 @Summary 退出登录 @Security Bearer @Success 200 {object} ginx.Response "{code:200,msg:发送验证码成功}" @Failure 400 {object} ginx.Response "{code:-1,msg:发送验证码失败}" @Router /api/v1/sendsms [post]

func SettingCreateHandler

func SettingCreateHandler(c *gin.Context)

SettingCreateHandler 创建数据 @Tags 系统信息 @Security Bearer @Summary 添加系统信息 @Param body body model.Setting true "设置信息" @Success 200 string string "{code: 200, msg: 添加成功}" @Failure 200 string string "{code: -1, msg: 添加失败}" @Router /api/v1/system/setting [post]

func SettingGetHandler

func SettingGetHandler(c *gin.Context)

SettingGetHandler 查询系统信息 @Tags 系统信息 @Security Bearer @Summary 查询系统信息 @Success 200 string string "{code: 200, data: {}}" "查询结果" @Failure 200 string string "{code:-1, msg:错误信息}" @Router /api/v1/setting [get]

func TablesCreateHandler

func TablesCreateHandler(c *gin.Context)

TablesCreateHandler 创建数据 @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 TablesDeleteHandler

func TablesDeleteHandler(c *gin.Context)

TablesDeleteHandler 删除数据 @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 TablesGetHandler

func TablesGetHandler(c *gin.Context)

TablesGetHandler 查询指定数据 @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 TablesGetInfoHandler

func TablesGetInfoHandler(c *gin.Context)

TablesGetInfoHandler 获取表信息 @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 TablesQueryHandler

func TablesQueryHandler(c *gin.Context)

TablesQueryHandler 查询数据 @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]

func TablesTreeHandler

func TablesTreeHandler(c *gin.Context)

TablesTreeHandler 表结构 @Tags 工具 @Security Bearer @Summary 查询表结构 @Success 200 {string} string "{code: 200, data: {}}" "查询结果" @Failure 200 {string} string "{code:-1, msg:错误信息}" @Router /api/v1/gen/tabletree [get]

func TablesUpdateHandler

func TablesUpdateHandler(c *gin.Context)

TablesUpdateHandler 更新数据 @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 [put]

func UploadFileHandler

func UploadFileHandler(c *gin.Context)

UploadFileHandler 上传图片 @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]

func UserCreateHandler

func UserCreateHandler(c *gin.Context)

UserCreateHandler 创建数据 @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/users [post]

func UserDeleteHandler

func UserDeleteHandler(c *gin.Context)

UserDeleteHandler 删除数据 @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/users/{id} [delete]

func UserGetHandler

func UserGetHandler(c *gin.Context)

UserGetHandler 查询指定数据 @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/users/{id} [get]

func UserGetProfileHandler

func UserGetProfileHandler(c *gin.Context)

UserGetProfileHandler 个人中心数据 @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 UserQueryHandler

func UserQueryHandler(c *gin.Context)

UserQueryHandler 查询数据 @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/users [get]

func UserResetPasswordHandler added in v2.0.14

func UserResetPasswordHandler(c *gin.Context)

UserUpdatePasswordHandler 重置密码 @Tags 系统用户 @Security Bearer @Summary 重置用户密码 @Success 200 string string "{code: 200, msg: 删除成功}" @Failure 200 string string "{code: -1, msg: 删除失败}" @Router /api/v1/users/{id}/reset [put]

func UserUpdateAvatarHandler

func UserUpdateAvatarHandler(c *gin.Context)

UserUpdateAvatarHandler 修改头像 @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 UserUpdateHandler

func UserUpdateHandler(c *gin.Context)

UserUpdateHandler 更新数据 @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/users/{id} [put]

Types

type Config

type Config struct {
	ConfigService *service.Config
}

Config 字典数据管理

func NewConfig

func NewConfig() *Config

NewConfig 字典实例化

type DBColumn

type DBColumn struct {
	DBColumnService *service.DBColumn
}

DBColumn 数据库列管理

func NewDBColumn

func NewDBColumn() *DBColumn

NewDBColumn 数据库列实例化

type DBTable

type DBTable struct {
	DBTableService *service.DBTable
}

DBTable 数据库表管理

func NewDBTable

func NewDBTable() *DBTable

NewDBTable 数据库表实例化

type Dept

type Dept struct {
	DeptService *service.Dept
	RoleService *service.Role
}

Dept 字典数据管理

func NewDept

func NewDept() *Dept

NewDept 字典实例化

type DictData

type DictData struct {
	DictDataService *service.DictData
}

DictData 字典数据管理

func NewDictData

func NewDictData() *DictData

NewDictData 字典实例化

type DictType

type DictType struct {
	DictTypeService *service.DictType
}

DictType 字典类型管理

func NewDictType

func NewDictType() *DictType

NewDictType 字典类型实例化

type FileDir

type FileDir struct {
	FileDirService *service.FileDir
}

FileDir 文件夹管理

func NewFileDir

func NewFileDir() *FileDir

NewFileDir 文件夹实例化

type FileInfo

type FileInfo struct {
	FileInfoService *service.FileInfo
}

FileInfo 文件信息管理

func NewFileInfo

func NewFileInfo() *FileInfo

NewFileInfo 字典实例化

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 NewGenerate

func NewGenerate() *Generate

NewGenerate 生成实例

type Login

type Login struct {
	Auth        auth.Auther
	UserService *service.User
	//RoleMenuService *service.RoleMenu
	LoginLogService *service.LoginLog
}

Login 登录管理

func NewLogin

func NewLogin(auth auth.Auther) *Login

NewLogin 登录实例

type LoginLog

type LoginLog struct {
	LoginLogService *service.LoginLog
}

LoginLog 登录日志管理

func NewLoginLog

func NewLoginLog() *LoginLog

NewLoginLog 字典实例化

type Menu struct {
	MenuService *service.Menu
	RoleService *service.Role
}

Menu 菜单管理

func NewMenu

func NewMenu() *Menu

NewMenu 菜单实例化

type Monitor

type Monitor struct {
	MonitoeService *service.Monitor
}

Monitor 监控管理

func NewMonitor

func NewMonitor() *Monitor

NewMonitor 监控实例

type OperLog

type OperLog struct {
	OperLogService *service.OperLog
}

OperLog 操作日志管理

func NewOperLog

func NewOperLog() *OperLog

NewOperLog 操作日志实例化

type Post

type Post struct {
	PostService *service.Post
}

Post 岗位管理

func NewPost

func NewPost() *Post

NewPost 字典实例化

type Role

type Role struct {
	RoleService *service.Role
}

Role 角色管理

func NewRole

func NewRole(e *casbin.SyncedEnforcer) *Role

NewRole 角色实例化

type Setting

type Setting struct {
	SettingService *service.Setting
}

Setting 设置管理

func NewSetting

func NewSetting() *Setting

NewSetting 设置实例

type Tables

type Tables struct {
	TablesService *service.Tables
	ColumnService *service.Column
}

Tables 字典数据管理

func NewTables

func NewTables() *Tables

NewTables 字典实例化

type User

type User struct {
	UserService *service.User
	RoleService *service.Role
	PostService *service.Post
	DeptService *service.Dept
}

User 系统用户管理

func NewUser

func NewUser() *User

NewUser 系统用户实例

Jump to

Keyboard shortcuts

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