Documentation ¶
Index ¶
Constants ¶
View Source
const AppPkgFileNameMaxLength = 100 // 跟结构体里的FileName字段长度限制保持一致
View Source
const HostUpdateMode = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppUpsertReq ¶
type AppUpsertReq struct { Name string `json:"name" binding:"required,max=50" label:"名称"` Version string `json:"version" binding:"required,max=50" label:"版本"` Port int32 `json:"port" binding:"required,min=1,max=65535" label:"端口"` Key string `json:"key" binding:"required,max=255" label:"部署包"` FileName string `json:"fileName" binding:"required,max=100" label:"文件名"` }
type DeployTaskUpsertReq ¶
type DeployTaskUpsertReq struct { UploadPath string `json:"uploadPath" binding:"required,max=255" label:"上传路径"` AppId int64 `json:"appId" binding:"required,min=1" label:"应用"` ScriptId int64 `json:"scriptId" binding:"required,min=1" label:"部署脚本"` HostGroupId int64 `json:"hostGroupId" binding:"required,min=1" label:"服务器组"` }
type GroupUpsertReq ¶
type HostUpsertReq ¶
type HostUpsertReq struct { Name string `json:"name" binding:"required,max=50" label:"名称"` Ip string `json:"ip" binding:"required,max=50" label:"ip地址"` Port int32 `json:"port" binding:"required,min=1,max=65535" label:"端口"` User string `json:"user" binding:"required,max=50" label:"用户名"` Password string `json:"password" binding:"required" label:"密码"` SortNum int32 `json:"sortNum" binding:"omitempty" label:"排序"` PasswordChanged bool `json:"passwordChanged" binding:"omitempty"` // 用于标识密码是否被手动修改 }
type ScriptUpsertReq ¶
type ScriptUpsertReq struct { Name string `json:"name" binding:"required,max=50" label:"名称"` Version string `json:"version" binding:"required,max=50" label:"版本"` Content string `json:"content" binding:"required,max=10000" label:"脚本内容"` Description string `json:"description" binding:"omitempty,max=2000" label:"使用说明"` }
type SshConnectParams ¶ added in v0.1.0
type SshConnectParams struct { Ip string `form:"ip" json:"ip" binding:"required,max=50" label:"ip地址"` Port int32 `form:"port" json:"port" binding:"required,min=1,max=65535" label:"端口"` User string `form:"user" json:"user" binding:"required,max=50" label:"用户名"` Password string `form:"password" json:"password" binding:"required" label:"密码"` }
type SshConnectTestParams ¶
type SshConnectTestParams struct { Ip string `form:"ip" json:"ip" binding:"required,max=50" label:"ip地址"` Port int32 `form:"port" json:"port" binding:"required,min=1,max=65535" label:"端口"` User string `form:"user" json:"user" binding:"required,max=50" label:"用户名"` Password string `form:"password" json:"password" binding:"required" label:"密码"` Mode int8 `form:"mode" json:"mode" binding:"omitempty,oneof=0 1" label:"模式"` PasswordChanged bool `form:"passwordChanged" json:"passwordChanged" binding:"omitempty"` // 用于标识密码是否被手动修改 }
type TaskUpsertReq ¶
type TaskUpsertReq struct { Name string `json:"name" binding:"required,max=50" label:"名称"` Type int8 `json:"type" binding:"required,oneof=1" label:"任务类型"` Cron string `json:"cron" binding:"omitempty,max=50" label:"cron表达式"` ExecuteType int8 `json:"executeType" binding:"omitempty,oneof=0 1" label:"执行方式"` Concrete map[string]any `json:"concrete" binding:"required" label:"具体任务"` }
Click to show internal directories.
Click to hide internal directories.