Documentation ¶
Index ¶
- type AppApi
- type ExplorerApi
- type ExplorerSftpApi
- func (a *ExplorerSftpApi) CreateDir(c *gin.Context)
- func (a *ExplorerSftpApi) DeleteEntry(c *gin.Context)
- func (a *ExplorerSftpApi) Download(c *gin.Context)
- func (a *ExplorerSftpApi) GetEntries(c *gin.Context)
- func (a *ExplorerSftpApi) Rename(c *gin.Context)
- func (a *ExplorerSftpApi) Upload(c *gin.Context)
- type GroupApi
- type HostApi
- type ScriptApi
- type ScriptTaskApi
- type TaskApi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppApi ¶
type AppApi struct {
// contains filtered or unexported fields
}
func (*AppApi) AddApp ¶
AddApp godoc
@Summary 添加应用 @Tags 应用管理 @Accept application/json @Produce application/json @Param [body] body req.AppUpsertReq true "应用信息" @Success 200 {object} R.Result @Router /devops/app [post]
func (*AppApi) DeleteApp ¶
DeleteApp godoc
@Summary 删除应用 @Tags 应用管理 @Produce application/json @Param id path int64 true "应用ID" @Success 200 {object} R.Result @Router /devops/app/:id [delete]
func (*AppApi) DownloadPkg ¶
DownloadPkg godoc
@Summary 下载部署包 @Tags 应用管理 @Accept multipart/form-data @Produce application/json @Param key query string true "文件Key路径" @Param fileName query string false "文件名" @Success 200 {object} R.Result @Router /devops/app/download [get]
func (*AppApi) 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[dvmodel.App]} @Router /devops/app/list [get]
type ExplorerApi ¶
type ExplorerApi struct {
// contains filtered or unexported fields
}
func GetExplorerApi ¶
func GetExplorerApi() *ExplorerApi
func (*ExplorerApi) CreateDir ¶ added in v0.1.0
func (a *ExplorerApi) CreateDir(c *gin.Context)
CreateDir godoc
@Summary 创建目录 @Tags 资源管理器(SFTP) @Accept application/json @Produce application/json @Param dir body string true "当前目录" @Param name body string true "创建目录的名称" @Success 200 {object} R.Result @Router /devops/explorer/create [post]
func (*ExplorerApi) DeleteEntry ¶
func (a *ExplorerApi) DeleteEntry(c *gin.Context)
DeleteEntry godoc
@Summary 删除文件或文件夹 @Tags 资源管理器 @Produce application/json @Param path query string true "文件或文件夹的路径" @Success 200 {object} R.Result @Router /devops/explorer/entry [delete]
func (*ExplorerApi) Download ¶
func (a *ExplorerApi) Download(c *gin.Context)
Download godoc
@Summary 下载文件 @Tags 资源管理器 @Accept multipart/form-data @Produce application/json @Param path query string true "文件完整路径" @Success 200 {object} R.Result @Router /devops/explorer/download [get]
func (*ExplorerApi) GetEntries ¶
func (a *ExplorerApi) GetEntries(c *gin.Context)
GetEntries godoc
@Summary 查询entry列表 @Tags 资源管理器 @Produce application/json @Param dir query string true "目录路径" @Success 200 {object} R.Result{value=[]res.ExplorerEntry} @Router /devops/explorer/entries [get]
func (*ExplorerApi) Rename ¶ added in v0.1.0
func (a *ExplorerApi) Rename(c *gin.Context)
Rename godoc
@Summary 重命名 @Tags 资源管理器(SFTP) @Accept application/json @Produce application/json @Param dir body string true "当前目录" @Param oldName body string true "旧名称" @Param newName body string true "新名称" @Success 200 {object} R.Result @Router /devops/explorer/rename [post]
func (*ExplorerApi) Upload ¶
func (a *ExplorerApi) Upload(c *gin.Context)
Upload godoc
@Summary 上传文件 @Tags 资源管理器 @Accept multipart/form-data @Produce application/json @Param dir formData string true "文件目录" @Param file formData file true "文件信息" @Success 200 {object} R.Result @Router /devops/explorer/upload [post]
type ExplorerSftpApi ¶ added in v0.1.0
type ExplorerSftpApi struct {
// contains filtered or unexported fields
}
func GetExplorerSftpApi ¶ added in v0.1.0
func GetExplorerSftpApi() *ExplorerSftpApi
func (*ExplorerSftpApi) CreateDir ¶ added in v0.1.0
func (a *ExplorerSftpApi) CreateDir(c *gin.Context)
CreateDir godoc
@Summary 创建目录 @Tags 资源管理器(SFTP) @Accept application/json @Produce application/json @Param hostId body int64 true "主机主键ID" @Param dir body string true "当前目录" @Param name body string true "创建目录的名称" @Success 200 {object} R.Result @Router /devops/explorer/sftp/create [post]
func (*ExplorerSftpApi) DeleteEntry ¶ added in v0.1.0
func (a *ExplorerSftpApi) DeleteEntry(c *gin.Context)
DeleteEntry godoc
@Summary 删除文件或文件夹 @Tags 资源管理器(SFTP) @Produce application/json @Param path query string true "文件或文件夹的路径" @Param hostId query int64 true "主机的主键ID" @Success 200 {object} R.Result @Router /devops/explorer/sftp/entry [delete]
func (*ExplorerSftpApi) Download ¶ added in v0.1.0
func (a *ExplorerSftpApi) Download(c *gin.Context)
Download godoc
@Summary 下载文件 @Tags 资源管理器(SFTP) @Accept multipart/form-data @Produce application/json @Param path query string true "文件完整路径" @Param hostId query int64 true "主机的主键ID" @Success 200 {object} R.Result @Router /devops/explorer/sftp/download [get]
func (*ExplorerSftpApi) GetEntries ¶ added in v0.1.0
func (a *ExplorerSftpApi) GetEntries(c *gin.Context)
GetEntries godoc
@Summary 查询entry列表 @Tags 资源管理器(SFTP) @Produce application/json @Param dir query string true "目录路径" @Param hostId query int64 true "主机的主键ID" @Success 200 {object} R.Result{value=[]res.ExplorerEntry} @Router /devops/explorer/sftp/entries [get]
func (*ExplorerSftpApi) Rename ¶ added in v0.1.0
func (a *ExplorerSftpApi) Rename(c *gin.Context)
Rename godoc
@Summary 重命名 @Tags 资源管理器(SFTP) @Accept application/json @Produce application/json @Param hostId body int64 true "主机主键ID" @Param dir body string true "当前目录" @Param oldName body string true "旧名称" @Param newName body string true "新名称" @Success 200 {object} R.Result @Router /devops/explorer/sftp/rename [post]
func (*ExplorerSftpApi) Upload ¶ added in v0.1.0
func (a *ExplorerSftpApi) Upload(c *gin.Context)
Upload godoc
@Summary 上传文件 @Tags 资源管理器(SFTP) @Accept multipart/form-data @Produce application/json @Param dir formData string true "文件目录" @Param file formData file true "文件信息" @Param hostId formData int64 true "主机的主键ID" @Success 200 {object} R.Result @Router /devops/explorer/sftp/upload [post]
type GroupApi ¶
type GroupApi struct {
// contains filtered or unexported fields
}
func GetGroupApi ¶
func GetGroupApi() *GroupApi
func (*GroupApi) AddGroup ¶
AddGroup godoc
@Summary 添加分组 @Tags 服务器分组管理 @Accept application/json @Produce application/json @Param [body] body req.GroupUpsertReq true "分组信息" @Success 200 {object} R.Result @Router /devops/group [post]
func (*GroupApi) DeleteGroup ¶
DeleteGroup godoc
@Summary 删除分组 @Tags 服务器分组管理 @Produce application/json @Param id path int64 true "分组ID" @Success 200 {object} R.Result @Router /devops/group/:id [delete]
func (*GroupApi) 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[dvmodel.Group]} @Router /devops/group/list [get]
func (*GroupApi) UpdateGroup ¶
UpdateGroup godoc
@Summary 更新分组 @Tags 服务器分组管理 @Accept application/json @Produce application/json @Param id path int64 true "分组ID" @Param [body] body req.GroupUpsertReq true "分组信息" @Success 200 {object} R.Result @Router /devops/group/:id [put]
type HostApi ¶
type HostApi struct {
// contains filtered or unexported fields
}
func GetHostApi ¶
func GetHostApi() *HostApi
func (*HostApi) AddHost ¶
AddHost godoc
@Summary 添加服务器 @Tags 服务器管理 @Accept application/json @Produce application/json @Param [body] body req.HostUpsertReq true "服务器信息" @Success 200 {object} R.Result @Router /devops/host [post]
func (*HostApi) DeleteHost ¶
DeleteHost godoc
@Summary 删除服务器 @Tags 服务器管理 @Produce application/json @Param id path int64 true "服务器ID" @Success 200 {object} R.Result @Router /devops/host/:id [delete]
func (*HostApi) GetAll ¶
GetAll godoc
@Summary 查询全部服务器列表 @Tags 服务器管理 @Produce application/json @Success 200 {object} R.Result{value=res.PageableData[res.HostBasicRes]} @Router /devops/host/all [get]
func (*HostApi) 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[dvmodel.Host]} @Router /devops/host/list [get]
func (*HostApi) SshConnectTest ¶
SshConnectTest godoc
@Summary SSH连接测试 @Tags 服务器管理 @Produce application/json @Param ip query string true "IP地址" @Param port query int16 true "端口" @Param user query string true "账号" @Param password query string true "密码" @Param mode query string true "模式:0,新增;1,编辑" @Param passwordChanged query bool true "是否修改了密码(仅编辑时有效)" @Success 200 {object} R.Result @Router /devops/host/connect-test [get]
func (*HostApi) UpdateHost ¶
UpdateHost godoc
@Summary 更新服务器 @Tags 服务器管理 @Accept application/json @Produce application/json @Param id path int64 true "服务器ID" @Param [body] body req.HostUpsertReq true "服务器信息" @Success 200 {object} R.Result @Router /devops/host/:id [put]
type ScriptApi ¶
type ScriptApi struct {
// contains filtered or unexported fields
}
func GetScriptApi ¶
func GetScriptApi() *ScriptApi
func (*ScriptApi) AddScript ¶
AddScript godoc
@Summary 添加脚本 @Tags 脚本管理 @Accept application/json @Produce application/json @Param [body] body req.ScriptUpsertReq true "脚本信息" @Success 200 {object} R.Result @Router /devops/script [post]
func (*ScriptApi) DeleteScript ¶
DeleteScript godoc
@Summary 删除脚本 @Tags 脚本管理 @Produce application/json @Param id path int64 true "脚本ID" @Success 200 {object} R.Result @Router /devops/script/:id [delete]
func (*ScriptApi) 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[res.ScriptRes]} @Router /devops/script/list [get]
func (*ScriptApi) UpdateScript ¶
UpdateScript godoc
@Summary 更新脚本 @Tags 脚本管理 @Accept application/json @Produce application/json @Param id path int64 true "脚本ID" @Param [body] body req.ScriptUpsertReq true "脚本信息" @Success 200 {object} R.Result @Router /devops/script/:id [put]
type ScriptTaskApi ¶ added in v1.0.0
type ScriptTaskApi struct {
// contains filtered or unexported fields
}
func GetScriptTaskApi ¶ added in v1.0.0
func GetScriptTaskApi() *ScriptTaskApi
func (*ScriptTaskApi) Add ¶ added in v1.0.0
func (a *ScriptTaskApi) Add(c *gin.Context)
Add godoc
@Summary 添加任务 @Tags 脚本任务管理 @Accept application/json @Produce application/json @Param [body] body req.ScriptTaskUpsertReq true "任务信息" @Success 200 {object} R.Result @Router /devops/script-task [post]
func (*ScriptTaskApi) Delete ¶ added in v1.0.0
func (a *ScriptTaskApi) Delete(c *gin.Context)
Delete godoc
@Summary 删除任务 @Tags 脚本任务管理 @Produce application/json @Param id path int64 true "任务ID" @Success 200 {object} R.Result @Router /devops/script-task/:id [delete]
func (*ScriptTaskApi) GetList ¶ added in v1.0.0
func (a *ScriptTaskApi) GetList(c *gin.Context)
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[task.ScriptTask]} @Router /devops/script-task/list [get]
func (*ScriptTaskApi) Start ¶ added in v1.0.0
func (a *ScriptTaskApi) Start(c *gin.Context)
Start godoc
@Summary 启动任务 @Tags 脚本任务管理 @Accept application/json @Produce application/json @Success 200 {object} R.Result @Router /devops/script-task/start/:id [post]
func (*ScriptTaskApi) Stop ¶ added in v1.0.0
func (a *ScriptTaskApi) Stop(c *gin.Context)
Stop godoc
@Summary 停止任务 @Tags 脚本任务管理 @Accept application/json @Produce application/json @Success 200 {object} R.Result @Router /devops/script-task/stop/:id [post]
func (*ScriptTaskApi) Update ¶ added in v1.0.0
func (a *ScriptTaskApi) Update(c *gin.Context)
Update godoc
@Summary 更新任务 @Tags 脚本任务管理 @Accept application/json @Produce application/json @Param id path int64 true "任务ID" @Param [body] body req.TaskUpsertReq true "任务信息" @Success 200 {object} R.Result @Router /devops/script-task/:id [put]
type TaskApi ¶
type TaskApi struct {
// contains filtered or unexported fields
}
func GetTaskApi ¶
func GetTaskApi() *TaskApi
func (*TaskApi) AddTask ¶
AddTask godoc
@Summary 添加任务 @Tags 任务管理 @Accept application/json @Produce application/json @Param [body] body req.TaskUpsertReq true "任务信息" @Success 200 {object} R.Result @Router /devops/task [post]
func (*TaskApi) DeleteTask ¶
DeleteTask godoc
@Summary 删除任务 @Tags 任务管理 @Produce application/json @Param id path int64 true "任务ID" @Success 200 {object} R.Result @Router /devops/task/:id [delete]
func (*TaskApi) 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[task.Task]} @Router /devops/task/list [get]
func (*TaskApi) StartTask ¶
StartTask godoc
@Summary 启动任务 @Tags 任务管理 @Accept application/json @Produce application/json @Success 200 {object} R.Result @Router /devops/task/start/:id [post]
func (*TaskApi) StopTask ¶
StopTask godoc
@Summary 停止任务 @Tags 任务管理 @Accept application/json @Produce application/json @Success 200 {object} R.Result @Router /devops/task/stop/:id [post]
func (*TaskApi) UpdateTask ¶
UpdateTask godoc
@Summary 更新任务 @Tags 任务管理 @Accept application/json @Produce application/json @Param id path int64 true "任务ID" @Param [body] body req.TaskUpsertReq true "任务信息" @Success 200 {object} R.Result @Router /devops/task/:id [put]