mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 23:17:21 +08:00
dev:修复注释路由前缀 (#8292)
This commit is contained in:
parent
48b3032de6
commit
1490ed7541
2 changed files with 16 additions and 16 deletions
|
@ -14,7 +14,7 @@ import (
|
||||||
// @Success 200 {object} response.HostToolRes
|
// @Success 200 {object} response.HostToolRes
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool [post]
|
// @Router /hosts/tool [post]
|
||||||
func (b *BaseApi) GetToolStatus(c *gin.Context) {
|
func (b *BaseApi) GetToolStatus(c *gin.Context) {
|
||||||
var req request.HostToolReq
|
var req request.HostToolReq
|
||||||
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
||||||
|
@ -36,7 +36,7 @@ func (b *BaseApi) GetToolStatus(c *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool/create [post]
|
// @Router /hosts/tool/create [post]
|
||||||
// @x-panel-log {"bodyKeys":["type"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"创建 [type] 配置","formatEN":"create [type] config"}
|
// @x-panel-log {"bodyKeys":["type"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"创建 [type] 配置","formatEN":"create [type] config"}
|
||||||
func (b *BaseApi) InitToolConfig(c *gin.Context) {
|
func (b *BaseApi) InitToolConfig(c *gin.Context) {
|
||||||
var req request.HostToolCreate
|
var req request.HostToolCreate
|
||||||
|
@ -58,7 +58,7 @@ func (b *BaseApi) InitToolConfig(c *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool/operate [post]
|
// @Router /hosts/tool/operate [post]
|
||||||
// @x-panel-log {"bodyKeys":["operate","type"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] [type] ","formatEN":"[operate] [type]"}
|
// @x-panel-log {"bodyKeys":["operate","type"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] [type] ","formatEN":"[operate] [type]"}
|
||||||
func (b *BaseApi) OperateTool(c *gin.Context) {
|
func (b *BaseApi) OperateTool(c *gin.Context) {
|
||||||
var req request.HostToolReq
|
var req request.HostToolReq
|
||||||
|
@ -80,7 +80,7 @@ func (b *BaseApi) OperateTool(c *gin.Context) {
|
||||||
// @Success 200 {object} response.HostToolConfig
|
// @Success 200 {object} response.HostToolConfig
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool/config [post]
|
// @Router /hosts/tool/config [post]
|
||||||
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] 主机工具配置文件 ","formatEN":"[operate] tool config"}
|
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] 主机工具配置文件 ","formatEN":"[operate] tool config"}
|
||||||
func (b *BaseApi) OperateToolConfig(c *gin.Context) {
|
func (b *BaseApi) OperateToolConfig(c *gin.Context) {
|
||||||
var req request.HostToolConfig
|
var req request.HostToolConfig
|
||||||
|
@ -103,7 +103,7 @@ func (b *BaseApi) OperateToolConfig(c *gin.Context) {
|
||||||
// @Success 200 {string} logContent
|
// @Success 200 {string} logContent
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool/log [post]
|
// @Router /hosts/tool/log [post]
|
||||||
func (b *BaseApi) GetToolLog(c *gin.Context) {
|
func (b *BaseApi) GetToolLog(c *gin.Context) {
|
||||||
var req request.HostToolLogReq
|
var req request.HostToolLogReq
|
||||||
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
||||||
|
@ -125,7 +125,7 @@ func (b *BaseApi) GetToolLog(c *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool/supervisor/process [post]
|
// @Router /hosts/tool/supervisor/process [post]
|
||||||
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] 守护进程 ","formatEN":"[operate] process"}
|
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] 守护进程 ","formatEN":"[operate] process"}
|
||||||
func (b *BaseApi) OperateProcess(c *gin.Context) {
|
func (b *BaseApi) OperateProcess(c *gin.Context) {
|
||||||
var req request.SupervisorProcessConfig
|
var req request.SupervisorProcessConfig
|
||||||
|
@ -147,7 +147,7 @@ func (b *BaseApi) OperateProcess(c *gin.Context) {
|
||||||
// @Success 200 {object} response.SupervisorProcessConfig
|
// @Success 200 {object} response.SupervisorProcessConfig
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool/supervisor/process [get]
|
// @Router /hosts/tool/supervisor/process [get]
|
||||||
func (b *BaseApi) GetProcess(c *gin.Context) {
|
func (b *BaseApi) GetProcess(c *gin.Context) {
|
||||||
configs, err := hostToolService.GetSupervisorProcessConfig()
|
configs, err := hostToolService.GetSupervisorProcessConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -164,7 +164,7 @@ func (b *BaseApi) GetProcess(c *gin.Context) {
|
||||||
// @Success 200 {string} content
|
// @Success 200 {string} content
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/tool/supervisor/process/file [post]
|
// @Router /hosts/tool/supervisor/process/file [post]
|
||||||
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] Supervisor 进程文件 ","formatEN":"[operate] Supervisor Process Config file"}
|
// @x-panel-log {"bodyKeys":["operate"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operate] Supervisor 进程文件 ","formatEN":"[operate] Supervisor Process Config file"}
|
||||||
func (b *BaseApi) GetProcessFile(c *gin.Context) {
|
func (b *BaseApi) GetProcessFile(c *gin.Context) {
|
||||||
var req request.SupervisorProcessFileReq
|
var req request.SupervisorProcessFileReq
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
// @Success 200 {object} dto.SSHInfo
|
// @Success 200 {object} dto.SSHInfo
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/ssh/search [post]
|
// @Router /hosts/ssh/search [post]
|
||||||
func (b *BaseApi) GetSSHInfo(c *gin.Context) {
|
func (b *BaseApi) GetSSHInfo(c *gin.Context) {
|
||||||
info, err := sshService.GetSSHInfo()
|
info, err := sshService.GetSSHInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -29,7 +29,7 @@ func (b *BaseApi) GetSSHInfo(c *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/ssh/operate [post]
|
// @Router /hosts/ssh/operate [post]
|
||||||
// @x-panel-log {"bodyKeys":["operation"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operation] SSH ","formatEN":"[operation] SSH"}
|
// @x-panel-log {"bodyKeys":["operation"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"[operation] SSH ","formatEN":"[operation] SSH"}
|
||||||
func (b *BaseApi) OperateSSH(c *gin.Context) {
|
func (b *BaseApi) OperateSSH(c *gin.Context) {
|
||||||
var req dto.Operate
|
var req dto.Operate
|
||||||
|
@ -51,7 +51,7 @@ func (b *BaseApi) OperateSSH(c *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/ssh/update [post]
|
// @Router /hosts/ssh/update [post]
|
||||||
// @x-panel-log {"bodyKeys":["key","value"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置 [key] => [value]","formatEN":"update SSH setting [key] => [value]"}
|
// @x-panel-log {"bodyKeys":["key","value"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置 [key] => [value]","formatEN":"update SSH setting [key] => [value]"}
|
||||||
func (b *BaseApi) UpdateSSH(c *gin.Context) {
|
func (b *BaseApi) UpdateSSH(c *gin.Context) {
|
||||||
var req dto.SSHUpdate
|
var req dto.SSHUpdate
|
||||||
|
@ -73,7 +73,7 @@ func (b *BaseApi) UpdateSSH(c *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/conffile/update [post]
|
// @Router /hosts/conffile/update [post]
|
||||||
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置文件","formatEN":"update SSH conf"}
|
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"修改 SSH 配置文件","formatEN":"update SSH conf"}
|
||||||
func (b *BaseApi) UpdateSSHByfile(c *gin.Context) {
|
func (b *BaseApi) UpdateSSHByfile(c *gin.Context) {
|
||||||
var req dto.SSHConf
|
var req dto.SSHConf
|
||||||
|
@ -95,7 +95,7 @@ func (b *BaseApi) UpdateSSHByfile(c *gin.Context) {
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/ssh/generate [post]
|
// @Router /hosts/ssh/generate [post]
|
||||||
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"生成 SSH 密钥 ","formatEN":"generate SSH secret"}
|
// @x-panel-log {"bodyKeys":[],"paramKeys":[],"BeforeFunctions":[],"formatZH":"生成 SSH 密钥 ","formatEN":"generate SSH secret"}
|
||||||
func (b *BaseApi) GenerateSSH(c *gin.Context) {
|
func (b *BaseApi) GenerateSSH(c *gin.Context) {
|
||||||
var req dto.GenerateSSH
|
var req dto.GenerateSSH
|
||||||
|
@ -117,7 +117,7 @@ func (b *BaseApi) GenerateSSH(c *gin.Context) {
|
||||||
// @Success 200 {string} data
|
// @Success 200 {string} data
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/ssh/secret [post]
|
// @Router /hosts/ssh/secret [post]
|
||||||
func (b *BaseApi) LoadSSHSecret(c *gin.Context) {
|
func (b *BaseApi) LoadSSHSecret(c *gin.Context) {
|
||||||
var req dto.GenerateLoad
|
var req dto.GenerateLoad
|
||||||
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
||||||
|
@ -139,7 +139,7 @@ func (b *BaseApi) LoadSSHSecret(c *gin.Context) {
|
||||||
// @Success 200 {object} dto.SSHLog
|
// @Success 200 {object} dto.SSHLog
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/ssh/log [post]
|
// @Router /hosts/ssh/log [post]
|
||||||
func (b *BaseApi) LoadSSHLogs(c *gin.Context) {
|
func (b *BaseApi) LoadSSHLogs(c *gin.Context) {
|
||||||
var req dto.SearchSSHLog
|
var req dto.SearchSSHLog
|
||||||
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
if err := helper.CheckBindAndValidate(&req, c); err != nil {
|
||||||
|
@ -159,7 +159,7 @@ func (b *BaseApi) LoadSSHLogs(c *gin.Context) {
|
||||||
// @Success 200 {string} data
|
// @Success 200 {string} data
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Security Timestamp
|
// @Security Timestamp
|
||||||
// @Router /host/ssh/conf [get]
|
// @Router /hosts/ssh/conf [get]
|
||||||
func (b *BaseApi) LoadSSHConf(c *gin.Context) {
|
func (b *BaseApi) LoadSSHConf(c *gin.Context) {
|
||||||
data, err := sshService.LoadSSHConf()
|
data, err := sshService.LoadSSHConf()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue