Documentation ¶
Index ¶
- type AuthApi
- type DeptApi
- type IconApi
- type JobApi
- type LogApi
- type MenuApi
- func (a *MenuApi) AddMenu(c *gin.Context)
- func (a *MenuApi) DeleteMenu(c *gin.Context)
- func (a *MenuApi) GetMenu(c *gin.Context)
- func (a *MenuApi) GetMenuTree(c *gin.Context)
- func (a *MenuApi) GetMyMenuTree(c *gin.Context)
- func (a *MenuApi) GetMyPermissions(c *gin.Context)
- func (a *MenuApi) UpdateMenu(c *gin.Context)
- type RoleApi
- type SettingsApi
- type SseApi
- type UserApi
- func (a *UserApi) AddUser(c *gin.Context)
- func (a *UserApi) ChangePasswd(c *gin.Context)
- func (a *UserApi) DeleteUser(c *gin.Context)
- func (a *UserApi) DisableAccount(c *gin.Context)
- func (a *UserApi) EnableAccount(c *gin.Context)
- func (a *UserApi) GetList(c *gin.Context)
- func (a *UserApi) GetUser(c *gin.Context)
- func (a *UserApi) ResetPasswd(c *gin.Context)
- func (a *UserApi) UpdateUser(c *gin.Context)
- func (a *UserApi) UpdateUserMenus(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthApi ¶
type AuthApi struct {
// contains filtered or unexported fields
}
func GetAuthApi ¶
func GetAuthApi() *AuthApi
func (*AuthApi) ChangeMyPasswd ¶
ChangeMyPasswd godoc
@Summary 修改密码 @Tags 账号相关 @Accept application/json @Produce application/json @Param [body] body req.ChangePasswdReq true "修改密码信息" @Success 200 {object} R.Result @Router /auth/passwd [put]
func (*AuthApi) GetMyInfo ¶
GetMyInfo godoc
@Summary 查询我的信息 @Tags 账号相关 @Produce application/json @Success 200 {object} R.Result{value=model.User} @Router /auth/my-info [get]
func (*AuthApi) GetWebShellToken ¶
GetWebShellToken godoc
@Summary 获取WebShell连接需要的token @Tags 账号相关 @Produce application/json @Success 200 {object} R.Result @Router /auth/web-shell-token [get]
func (*AuthApi) Login ¶
Login godoc
@Summary 登录 @Tags 账号相关 @Accept application/json @Produce application/json @Param [body] body req.LoginReq true "登录信息" @Success 200 {object} R.Result{value=model.User} @Router /auth/login [post]
func (*AuthApi) UpdateMyInfo ¶
UpdateMyInfo godoc
@Summary 更新我的信息 @Tags 账号相关 @Accept application/json @Produce application/json @Param [body] body req.UpsertMyInfoReq true "用户信息" @Success 200 {object} R.Result @Router /auth/my-info [put]
type DeptApi ¶
type DeptApi struct {
// contains filtered or unexported fields
}
func GetDeptApi ¶
func GetDeptApi() *DeptApi
func (*DeptApi) AddDept ¶
AddDept godoc
@Summary 添加部门 @Tags 部门管理 @Accept application/json @Produce application/json @Param [body] body req.DeptUpsertReq true "部门信息" @Success 200 {object} R.Result @Router /dept [post]
func (*DeptApi) DeleteDept ¶
DeleteDept godoc
@Summary 删除部门 @Tags 部门管理 @Produce application/json @Param id path int64 true "部门ID" @Success 200 {object} R.Result @Router /dept/:id [delete]
func (*DeptApi) GetDept ¶
GetDept godoc
@Summary 查询部门信息 @Tags 部门管理 @Produce application/json @Param id path int64 true "部门ID" @Success 200 {object} R.Result{value=model.Dept} @Router /dept/:id [get]
func (*DeptApi) GetDeptTree ¶
GetDeptTree godoc
@Summary 查询部门树 @Tags 部门管理 @Produce application/json @Param keyword query string false "按照名称模糊搜索" @Success 200 {object} R.Result{value=res.DeptTree} @Router /dept/tree [get]
func (*DeptApi) UpdateDept ¶
UpdateDept godoc
@Summary 修改部门 @Tags 部门管理 @Accept application/json @Produce application/json @Param id path int64 true "部门ID" @Param [body] body req.DeptUpsertReq true "部门信息" @Success 200 {object} R.Result @Router /dept/:id [put]
type IconApi ¶
type IconApi struct {
// contains filtered or unexported fields
}
func GetIconApi ¶
func GetIconApi() *IconApi
type JobApi ¶
type JobApi struct {
// contains filtered or unexported fields
}
func (*JobApi) AddJob ¶
AddJob godoc
@Summary 添加岗位 @Tags 岗位管理 @Accept application/json @Produce application/json @Param [body] body req.JobUpsertReq true "岗位信息" @Success 200 {object} R.Result @Router /job [post]
func (*JobApi) DeleteJob ¶
DeleteJob godoc
@Summary 删除岗位 @Tags 岗位管理 @Produce application/json @Param id path int64 true "岗位ID" @Success 200 {object} R.Result @Router /job/:id [delete]
func (*JobApi) GetList ¶
GetList godoc
@Summary 查询岗位列表 @Tags 岗位管理 @Produce application/json @Param keyword query string false "按照名称模糊搜索" @Param page query int64 false "页码" @Param pageSize query int64 false "每页查询条数" @Success 200 {object} R.Result{value=res.PageableData[model.Job]} @Router /job/list [get]
type LogApi ¶
type LogApi struct {
// contains filtered or unexported fields
}
func (*LogApi) DeleteExceptionLog ¶
DeleteExceptionLog godoc
@Summary 清除异常日志 @Tags 日志管理 @Produce application/json @Param type query int16 true "清除方式" @Success 200 {object} R.Result @Router /log/exception [delete]
func (*LogApi) DeleteLoginLog ¶
DeleteLoginLog godoc
@Summary 清除登录日志 @Tags 日志管理 @Produce application/json @Param type query int16 true "清除方式" @Success 200 {object} R.Result @Router /log/login [delete]
func (*LogApi) DeleteOpLog ¶
DeleteOpLog godoc
@Summary 清除操作日志 @Tags 日志管理 @Produce application/json @Param type query int16 true "清除方式" @Success 200 {object} R.Result @Router /log/op [delete]
func (*LogApi) GetExceptionLogList ¶
GetExceptionLogList godoc
@Summary 查询异常日志列表 @Tags 日志管理 @Produce application/json @Param keyword query string false "按照用户名搜索" @Param page query int64 false "页码" @Param pageSize query int64 false "每页查询条数" @Success 200 {object} R.Result{value=res.PageableData[model.ExceptionLog]} @Router /log/exception [get]
func (*LogApi) GetLoginLogList ¶
GetLoginLogList godoc
@Summary 查询登录日志列表 @Tags 日志管理 @Produce application/json @Param keyword query string false "按照用户名搜索" @Param page query int64 false "页码" @Param pageSize query int64 false "每页查询条数" @Success 200 {object} R.Result{value=res.PageableData[model.LoginLog]} @Router /log/login [get]
func (*LogApi) GetOpLogList ¶
GetOpLogList godoc
@Summary 查询操作日志列表 @Tags 日志管理 @Produce application/json @Param keyword query string false "按照用户名搜索" @Param page query int64 false "页码" @Param pageSize query int64 false "每页查询条数" @Success 200 {object} R.Result{value=res.PageableData[model.OpLog]} @Router /log/op [get]
type MenuApi ¶
type MenuApi struct {
// contains filtered or unexported fields
}
func GetMenuApi ¶
func GetMenuApi() *MenuApi
func (*MenuApi) AddMenu ¶
AddMenu godoc
@Summary 添加菜单 @Tags 菜单管理 @Accept application/json @Produce application/json @Param [body] body req.MenuUpsertReq true "菜单信息" @Success 200 {object} R.Result @Router /menu [post]
func (*MenuApi) DeleteMenu ¶
DeleteMenu godoc
@Summary 删除菜单 @Tags 菜单管理 @Produce application/json @Param id path int64 true "菜单ID" @Success 200 {object} R.Result @Router /menu/:id [delete]
func (*MenuApi) GetMenu ¶
GetMenu godoc
@Summary 查询菜单信息 @Tags 菜单管理 @Produce application/json @Param id path int64 true "菜单ID" @Success 200 {object} R.Result{value=model.Menu} @Router /menu/:id [get]
func (*MenuApi) GetMenuTree ¶
GetMenuTree godoc
@Summary 查询菜单树 @Tags 菜单管理 @Produce application/json @Success 200 {object} R.Result{value=res.MenuTree} @Router /menu/tree [get]
func (*MenuApi) GetMyMenuTree ¶
GetMyMenuTree godoc
@Summary 查询当前用户有权限访问的菜单树(仅查询显示的菜单) @Tags 菜单管理 @Produce application/json @Success 200 {object} R.Result{value=res.MenuTree} @Router /menu/my/tree [get]
func (*MenuApi) GetMyPermissions ¶
GetMyPermissions godoc
@Summary 查询当前用户拥有的所有权限列表 @Tags 菜单管理 @Produce application/json @Success 200 {object} R.Result{value=[]string} @Router /menu/my/permissions [get]
func (*MenuApi) UpdateMenu ¶
UpdateMenu godoc
@Summary 修改菜单 @Tags 菜单管理 @Accept application/json @Produce application/json @Param id path int64 true "菜单ID" @Param [body] body req.MenuUpsertReq true "菜单信息" @Success 200 {object} R.Result @Router /menu/:id [put]
type RoleApi ¶
type RoleApi struct {
// contains filtered or unexported fields
}
func GetRoleApi ¶
func GetRoleApi() *RoleApi
func (*RoleApi) AddRole ¶
AddRole godoc
@Summary 添加角色 @Tags 角色管理 @Accept application/json @Produce application/json @Param [body] body req.RoleUpsertReq true "角色信息" @Success 200 {object} R.Result @Router /role [post]
func (*RoleApi) DeleteRole ¶
DeleteRole godoc
@Summary 删除角色 @Tags 角色管理 @Produce application/json @Param id path int64 true "角色ID" @Success 200 {object} R.Result @Router /role/:id [delete]
func (*RoleApi) GetList ¶
GetList godoc
@Summary 查询角色列表 @Tags 角色管理 @Produce application/json @Param keyword query string false "按照名称模糊搜索" @Param page query int64 false "页码" @Param pageSize query int64 false "每页查询条数" @Success 200 {object} R.Result{value=res.PageableData[model.Role]} @Router /role/list [get]
func (*RoleApi) GetRole ¶
GetRole godoc
@Summary 查询角色信息 @Tags 角色管理 @Produce application/json @Param id path int64 true "角色ID" @Success 200 {object} R.Result{value=model.Role} @Router /role/:id [get]
func (*RoleApi) UpdateRole ¶
UpdateRole godoc
@Summary 更新角色 @Tags 角色管理 @Accept application/json @Produce application/json @Param id path int64 true "角色ID" @Param [body] body req.RoleUpsertReq true "角色信息" @Success 200 {object} R.Result @Router /role/:id [put]
func (*RoleApi) UpdateRoleMenus ¶
UpdateRoleMenus godoc
@Summary 角色绑定菜单 @Tags 角色管理 @Accept application/json @Produce application/json @Param [body] body req.RoleMenusUpdateReq true "菜单列表" @Success 200 {object} R.Result @Router /role/:id/menus [put]
type SettingsApi ¶
type SettingsApi struct {
// contains filtered or unexported fields
}
func GetSettingsApi ¶
func GetSettingsApi() *SettingsApi
func (*SettingsApi) GetSettings ¶
func (a *SettingsApi) GetSettings(c *gin.Context)
GetSettings godoc
@Summary 查询系统信息 @Tags 系统配置 @Produce application/json @Param key query string true "键名" @Success 200 {object} R.Result{value=model.Settings} @Router /settings [get]
func (*SettingsApi) Upsert ¶
func (a *SettingsApi) Upsert(c *gin.Context)
Upsert godoc
@Summary 保存/更新系统配置 @Tags 系统配置 @Accept application/json @Produce application/json @Param [body] body req.SettingsUpsertReq true "配置信息" @Success 200 {object} R.Result @Router /settings [put]
type SseApi ¶
type SseApi struct {
// contains filtered or unexported fields
}
func (*SseApi) MessagePush ¶
MessagePush godoc
@Summary 服务端事件消息推送 @Tags 消息服务 @Accept application/json @Produce text/event-stream @Router /sse/message-push [get]
func (*SseApi) PushHostLogEvent ¶
PushHostLogEvent godoc
@Summary 推送远程主机日志 @Tags 任务管理 @Accept application/json @Produce text/event-stream @Param id path int64 true "任务ID" @Param host query string true "主机IP" @Param hostLogName query string true "主机日志的文件名" @Router /sse/task/:id/host-log [get]
func (*SseApi) PushManifestLogEvent ¶
PushManifestLogEvent godoc
@Summary 推送manifest日志 @Tags 任务管理 @Accept application/json @Produce text/event-stream @Param id path int64 true "任务ID" @Router /sse/task/:id/manifest-log [get]
type UserApi ¶
type UserApi struct {
// contains filtered or unexported fields
}
func GetUserApi ¶
func GetUserApi() *UserApi
func (*UserApi) AddUser ¶
AddUser godoc
@Summary 添加用户 @Description 添加用户,添加成功后,密码会通过邮箱发给用户 @Tags 用户管理 @Accept application/json @Produce application/json @Param [body] body req.UserUpsertReq true "用户信息" @Success 200 {object} R.Result @Router /user [post]
func (*UserApi) ChangePasswd ¶
ChangePasswd godoc
@Summary 修改密码 @Tags 用户管理 @Accept application/json @Produce application/json @Param [body] body req.ChangePasswdReq true "修改密码信息" @Success 200 {object} R.Result @Router /user/passwd [put]
func (*UserApi) DeleteUser ¶
DeleteUser godoc
@Summary 删除用户 @Tags 用户管理 @Produce application/json @Param id path int64 true "用户ID" @Success 200 {object} R.Result @Router /user/:id [delete]
func (*UserApi) DisableAccount ¶
DisableAccount godoc
@Summary 禁用账号 @Tags 用户管理 @Produce application/json @Param id path int64 true "用户ID" @Success 200 {object} R.Result @Router /user/disable/:id [put]
func (*UserApi) EnableAccount ¶
EnableAccount godoc
@Summary 启用账号 @Tags 用户管理 @Produce application/json @Param id path int64 true "用户ID" @Success 200 {object} R.Result @Router /user/enable/:id [put]
func (*UserApi) GetList ¶
GetList godoc
@Summary 查询用户列表 @Tags 用户管理 @Produce application/json @Param keyword query string false "搜索关键字(支持按名字、昵称、邮箱、手机号模糊搜索)" @Param status query int64 false "用户状态" @Param page query int64 false "页码" @Param pageSize query int64 false "每页查询条数" @Param dates query []string false "开始时间和结束时间" @Success 200 {object} R.Result{value=res.PageableData[model.User]} @Router /user/list [get]
func (*UserApi) GetUser ¶
GetUser godoc
@Summary 查询用户信息 @Tags 用户管理 @Produce application/json @Param id path int64 true "用户ID" @Success 200 {object} R.Result{value=model.User} @Router /user/:id [get]
func (*UserApi) ResetPasswd ¶
ResetPasswd godoc
@Summary 重置密码 @Tags 用户管理 @Accept application/json @Produce application/json @Param [body] body req.ChangePasswdReq true "修改密码信息" @Success 200 {object} R.Result @Router /user/passwd-reset/:id [put]
func (*UserApi) UpdateUser ¶
UpdateUser godoc
@Summary 更新用户信息 @Tags 用户管理 @Accept application/json @Produce application/json @Param id path int64 true "用户ID" @Param [body] body req.UserUpsertReq true "用户信息" @Success 200 {object} R.Result @Router /user/:id [put]
func (*UserApi) UpdateUserMenus ¶
UpdateUserMenus godoc
@Summary 用户绑定菜单 @Tags 用户管理 @Accept application/json @Produce application/json @Param id path int64 true "用户ID" @Param [body] body req.UserMenusUpdateReq true "菜单列表" @Success 200 {object} R.Result @Router /user/:id/menus [put]