Documentation ¶
Index ¶
- type ActionEntitySetInfo
- type AdminInfoOutput
- type AdminLoginInput
- type AdminLoginOut
- type AdminSessionInfo
- type AgentDateInfoInput
- type Bak
- type BakHistoryOutPut
- type ChangePwdInput
- type DashServiceStatItemOutput
- type DashServiceStatOutput
- type DateInfoOut
- type DateInfoOutItem
- type GroupUserListInput
- type GroupUserListOutPut
- type HistoryIDInput
- type HistoryListInput
- type HistoryListOutItem
- type HistoryListOutput
- type HistoryNumInfoOutput
- type HostAddInput
- type HostDeleteInput
- type HostIDInput
- type HostListInput
- type HostListOutItem
- type HostListOutput
- type HostUpdateInput
- type PanelGroupDataOutPut
- type PermissionsInfo
- type RoleInfo
- type ServiceTaskOutPut
- type SvcFinishNumInfoOut
- type TaskAddInput
- type TaskDeTailOutPut
- type TaskDeleteInput
- type TaskListInput
- type TaskListOutItem
- type TaskListOutput
- type TaskUpdateInput
- type UpdateUserInfo
- type UserGroupItem
- type UserGroupOutPut
- type UserIDInput
- type UserInfoOutPut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionEntitySetInfo ¶
type AdminInfoOutput ¶
type AdminInfoOutput struct { *UserInfoOutPut Role *RoleInfo `json:"role"` }
type AdminLoginInput ¶
type AdminLoginInput struct { UserName string `form:"username" json:"username" comment:"用户名" validate:"required" example:"admin"` Password string `form:"password" json:"password" comment:"密码" validate:"required" example:"123456"` }
func (*AdminLoginInput) BindValidParams ¶
func (a *AdminLoginInput) BindValidParams(ctx *gin.Context) error
BindValidParams 绑定并校验参数
type AdminLoginOut ¶
type AdminSessionInfo ¶
type AgentDateInfoInput ¶
type AgentDateInfoInput struct {
Day int `json:"day" form:"day"`
}
func (*AgentDateInfoInput) BindValidParam ¶
func (d *AgentDateInfoInput) BindValidParam(ctx *gin.Context) error
type BakHistoryOutPut ¶
type ChangePwdInput ¶
type ChangePwdInput struct { ID int `form:"id" json:"id"` OldPassword string `form:"old_password" json:"old_password" comment:"旧密码" validate:"required" example:"123456"` Password string `form:"password" json:"password" comment:"密码" validate:"required" example:"123456"` }
func (*ChangePwdInput) BindValidParams ¶
func (a *ChangePwdInput) BindValidParams(ctx *gin.Context) error
type DashServiceStatOutput ¶
type DashServiceStatOutput struct { Legend []string `json:"legend"` Data []DashServiceStatItemOutput `json:"data"` }
type DateInfoOut ¶
type DateInfoOut struct { TaskTotal int64 `json:"task_total"` FinishTotal int64 `json:"finish_total"` TaskIncreaseNum int64 `json:"task_increase_num"` TaskDecreaseNum int64 `json:"task_decrease_num"` FinishIncreaseNum int64 `json:"finish_increase_num"` FinishDecreaseNum int64 `json:"finish_decrease_num"` List []*DateInfoOutItem `json:"list"` }
type DateInfoOutItem ¶
type GroupUserListInput ¶
type GroupUserListInput struct { Info string `form:"info" json:"info" comment:"关键词" validate:"" example:""` PageNo int `form:"page_no" json:"page_no" comment:"每页条数" validate:"" example:"1"` PageSize int `form:"page_size" json:"page_size" comment:"页数" validate:"" example:"20"` Key string `form:"key" json:"key" comment:"组key" validate:"" ` }
func (*GroupUserListInput) BindValidParams ¶
func (a *GroupUserListInput) BindValidParams(ctx *gin.Context) error
type GroupUserListOutPut ¶
type GroupUserListOutPut struct { Total int `form:"total" json:"total" comment:"总数" validate:"" example:""` PageNo int `form:"page_no" json:"page_no" comment:"当前页数" validate:"" example:"1"` PageSize int `form:"page_size" json:"page_size" comment:"页数" validate:"" example:"20"` List []UserInfoOutPut `json:"list"` }
type HistoryIDInput ¶
type HistoryIDInput struct {
ID int `json:"id" form:"id"`
}
func (*HistoryIDInput) BindValidParams ¶
func (d *HistoryIDInput) BindValidParams(ctx *gin.Context) error
type HistoryListInput ¶
type HistoryListInput struct { Info string `form:"info" json:"info" comment:"关键词" validate:"" example:""` PageNo int `form:"page_no" json:"page_no" comment:"每页条数" validate:"" example:"1"` PageSize int `form:"page_size" json:"page_size" comment:"页数" validate:"" example:"20"` Status string `form:"status" json:"status" validate:""` SortField string `form:"sortField" json:"sortField" comment:"排序字段" ` SortOrder string `json:"sortOrder" form:"sortOrder" comment:"排序规则"` }
func (*HistoryListInput) BindValidParams ¶
func (d *HistoryListInput) BindValidParams(ctx *gin.Context) error
type HistoryListOutItem ¶
type HistoryListOutItem struct { ID int `json:"id"` Host string `json:"host" form:"host"` DBName string `json:"db_name" form:"db_name"` DingStatus int `json:"ding_status" form:"ding_status"` OSSStatus int `json:"oss_status" form:"oss_status"` Message string `json:"message" form:"message"` FileSize int `json:"file_size" form:"file_size"` FileName string `json:"file_name" form:"file_name"` BakTime string `json:"bak_time" form:"bak_time"` }
type HistoryListOutput ¶
type HistoryListOutput struct { Total int `form:"total" json:"total" comment:"总数" validate:"" example:""` List []HistoryListOutItem `json:"list" form:"list" comment:"列表" example:"" validate:""` //列表 PageNo int `form:"page_no" json:"page_no" comment:"当前页数" validate:"" example:"1"` PageSize int `form:"page_size" json:"page_size" comment:"页数" validate:"" example:"20"` }
type HistoryNumInfoOutput ¶
type HostAddInput ¶
type HostAddInput struct { Host string `form:"host" json:"host" comment:"数据库备份主机地址加端口" validate:"required,host_valid" example:"127.0.0.1"` User string `form:"username" json:"username" comment:"用户" validate:"required" example:"123456"` Content string `form:"content" json:"content" comment:"备注" validate:"" example:"123456"` Type int32 `form:"type" json:"type" comment:"1为mysql,2为elastic"` Password string `form:"password" json:"password" comment:"数据库密码" validate:"required" example:"123456"` }
HostAddInput 添加
func (*HostAddInput) BindValidParams ¶
func (d *HostAddInput) BindValidParams(ctx *gin.Context) error
type HostDeleteInput ¶
type HostDeleteInput struct {
ID int `json:"id" form:"id" validate:"required"`
}
HostDeleteInput 删除
func (*HostDeleteInput) BindValidParams ¶
func (d *HostDeleteInput) BindValidParams(ctx *gin.Context) error
type HostIDInput ¶
type HostIDInput struct {
HostID int `json:"host_id" form:"host_id"`
}
func (*HostIDInput) BindValidParams ¶
func (d *HostIDInput) BindValidParams(ctx *gin.Context) error
type HostListInput ¶
type HostListInput struct { Info string `form:"info" json:"info" comment:"关键词" validate:"" example:""` PageNo int `form:"page_no" json:"page_no" comment:"每页条数" validate:"" example:"1"` PageSize int `form:"page_size" json:"page_size" comment:"页数" validate:"" example:"20"` }
HostListInput 查询
func (*HostListInput) BindValidParams ¶
func (d *HostListInput) BindValidParams(ctx *gin.Context) error
type HostListOutItem ¶
type HostListOutItem struct { ID int `json:"id" form:"id"` Host string `json:"host" form:"host"` User string `json:"username" comment:"用户"` Password string `json:"password" comment:"数据库密码"` HostStatus int `json:"host_status"` Content string `json:"content"` TaskNum int `json:"task_num"` Type int32 `json:"type"` Avatar string `json:"avatar"` }
type HostListOutput ¶
type HostListOutput struct { Total int `form:"total" json:"total" comment:"总数" validate:"" example:""` List []HostListOutItem `json:"list" form:"list" comment:"列表" example:"" validate:""` //列表 }
type HostUpdateInput ¶
type HostUpdateInput struct { ID int `json:"id" form:"id" validate:"required"` Host string `form:"host" json:"host" comment:"数据库备份主机地址加端口" validate:"required,host_valid" example:"127.0.0.1"` User string `form:"username" json:"username" comment:"用户" validate:"required" example:"123456"` Content string `form:"content" json:"content" comment:"备注" validate:"" example:"123456"` Type int32 `form:"type" json:"type" comment:"1为mysql,2为elastic"` Password string `form:"password" json:"password" comment:"数据库密码" validate:"required" example:"123456"` }
HostUpdateInput 修改
func (*HostUpdateInput) BindValidParams ¶
func (d *HostUpdateInput) BindValidParams(ctx *gin.Context) error
type PanelGroupDataOutPut ¶
type PermissionsInfo ¶
type PermissionsInfo struct { RoleId string `json:"roleId"` PermissionId string `json:"permissionId"` PermissionName string `json:"permissionName"` Actions string `json:"actions"` ActionEntitySet []*ActionEntitySetInfo `json:"actionEntitySet"` ActionList string `json:"actionList"` DataAccess string `json:"dataAccess"` }
type ServiceTaskOutPut ¶
type SvcFinishNumInfoOut ¶
type TaskAddInput ¶
type TaskAddInput struct { HostID int `json:"host_id" form:"host_id" validate:"required"` DBName string `form:"db_name" json:"db_name" comment:"库名" validate:"required" example:"123456"` BackupCycle string `form:"backup_cycle" json:"backup_cycle" comment:"数据库备份时间" validate:"required,is_valid_bycle" example:"123456"` KeepNumber int `form:"keep_number" json:"keep_number" comment:"保留周期" validate:"required" example:"123456"` IsAllDBBak int `form:"is_all_dbBak" json:"is_all_dbBak" comment:"是否全库备份 0开启 1关闭" example:"123456"` IsDingSend int `json:"is_ding_send"` DingAccessToken string `json:"ding_access_token"` DingSecret string `json:"ding_secret"` OssType int `json:"oss_type" validate:"" ` IsOssSave int `json:"is_oss_save" validate:"" ` Endpoint string `json:"endpoint" validate:"" ` OssAccess string `json:"oss_access" validate:"" ` OssSecret string `json:"oss_secret" validate:"" ` BucketName string `json:"bucket_name" validate:"" ` Directory string `json:"directory" validate:"" ` }
TaskAddInput 新增task
func (*TaskAddInput) BindValidParams ¶
func (d *TaskAddInput) BindValidParams(ctx *gin.Context) error
type TaskDeTailOutPut ¶
type TaskDeTailOutPut struct { ID int `json:"id" form:"id"` Host string `json:"host" form:"host"` HostID int `json:"host_id" form:"host_id"` DBName string `json:"db_name" form:"db_name"` BackupCycle string `json:"backup_cycle" form:"backup_cycle"` KeepNumber int `json:"keep_number" form:"keep_number"` CreateAt string `json:"create_at" form:"create_at"` DingID int `json:"ding_id"` IsDingSend int `json:"is_ding_send" comment:"是否发送钉钉消息"` DingAccessToken string `json:"ding_access_token" comment:"accessToken"` DingSecret string `json:"ding_secret" comment:"secret"` OssID int `json:"oss_id"` IsOssSave int `json:"is_oss_save" comment:"是否保存到oss中 0关闭1开启"` OssType int `json:"oss_type" comment:"oss类型"` Endpoint string `json:"endpoint" comment:"endpoint"` OssAccess string `json:"oss_access" comment:"ossaccess"` OssSecret string `json:"oss_secret" comment:"secret"` BucketName string `json:"bucket_name" comment:"bucket名字"` Directory string `json:"directory" comment:"目录"` }
type TaskDeleteInput ¶
type TaskDeleteInput struct {
ID int `json:"id" form:"id" validate:"required"`
}
TaskDeleteInput 删除task
func (*TaskDeleteInput) BindValidParams ¶
func (d *TaskDeleteInput) BindValidParams(ctx *gin.Context) error
type TaskListInput ¶
type TaskListInput struct { HostId int `json:"host_id" form:"host_id" validate:""` Info string `form:"info" json:"info" comment:"关键词" validate:"" example:""` Status int `form:"status" json:"status" comment:"任务状态,1为关闭,2为开启" validate:"" example:""` PageNo int `form:"page_no" json:"page_no" comment:"每页条数" validate:"" example:"1"` PageSize int `form:"page_size" json:"page_size" comment:"页数" validate:"" example:"20"` }
TaskListInput 通过page page-size 查询服务信息
func (*TaskListInput) BindValidParams ¶
func (d *TaskListInput) BindValidParams(ctx *gin.Context) error
type TaskListOutItem ¶
type TaskListOutItem struct { ID int `json:"id" form:"id"` Host string `json:"host" form:"host"` HostID int `json:"host_id" form:"host_id"` DBName string `json:"db_name" form:"db_name"` BackupCycle string `json:"backup_cycle" form:"backup_cycle"` KeepNumber int `json:"keep_number" form:"keep_number"` Status int `json:"status" form:"status"` CreateAt string `json:"create_at" form:"create_at"` }
type TaskListOutput ¶
type TaskListOutput struct { Total int `form:"total" json:"total" comment:"总数" validate:"" example:""` List []TaskListOutItem `json:"list" form:"list" comment:"列表" example:"" validate:""` //列表 PageNo int `form:"page_no" json:"page_no" comment:"每页条数" validate:"" example:"1"` PageSize int `form:"page_size" json:"page_size" comment:"页数" validate:"" example:"20"` }
type TaskUpdateInput ¶
type TaskUpdateInput struct { ID int `json:"id" form:"id" validate:"required"` HostID int `json:"host_id" form:"host_id" validate:"required"` DBName string `form:"db_name" json:"db_name" comment:"库名" validate:"required" example:"123456"` BackupCycle string `form:"backup_cycle" json:"backup_cycle" comment:"数据库备份时间" validate:"required,is_valid_bycle" example:"123456"` KeepNumber int `form:"keep_number" json:"keep_number" comment:"保留周期" validate:"required" example:"123456"` IsAllDBBak int `form:"is_all_dbBak" json:"is_all_dbBak" comment:"是否全库备份 0开启 1关闭" example:"123456"` IsDingSend int `json:"is_ding_send"` DingAccessToken string `json:"ding_access_token"` DingSecret string `json:"ding_secret"` OssType int `json:"oss_type" validate:"" ` IsOssSave int `json:"is_oss_save" validate:"" ` Endpoint string `json:"endpoint" validate:"" ` OssAccess string `json:"oss_access" validate:"" ` OssSecret string `json:"oss_secret" validate:"" ` BucketName string `json:"bucket_name" validate:"" ` Directory string `json:"directory" validate:"" ` }
TaskUpdateInput 更新任务
func (*TaskUpdateInput) BindValidParams ¶
func (d *TaskUpdateInput) BindValidParams(ctx *gin.Context) error
type UpdateUserInfo ¶
type UpdateUserInfo struct { ID int `json:"id" form:"id"` Name string `json:"name" form:"name"` GroupID int `json:"group_name" form:"group_name"` Introduction string `json:"introduction" form:"introduction"` }
func (*UpdateUserInfo) BindValidParams ¶
func (a *UpdateUserInfo) BindValidParams(ctx *gin.Context) error
type UserGroupItem ¶
type UserGroupOutPut ¶
type UserGroupOutPut struct { Title string `json:"title"` Key string `json:"key"` UserGroupItem []*UserGroupItem `json:"children"` }
type UserIDInput ¶
type UserIDInput struct {
ID int `form:"id" json:"id"`
}
func (*UserIDInput) BindValidParams ¶
func (a *UserIDInput) BindValidParams(ctx *gin.Context) error
type UserInfoOutPut ¶
type UserInfoOutPut struct { ID int `json:"id"` Name string `json:"name"` LoginTime string `json:"login_time"` Avatar string `json:"avatar"` Introduction string `json:"introduction"` Status int `json:"status"` CreatorId string `json:"creatorId"` GroupName string `json:"group_name"` RoleName string `json:"role_name"` }
Click to show internal directories.
Click to hide internal directories.