Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { model.Base Name string `json:"name" gorm:"type:varchar(50);not null;index:idx_n_v,unique,priority:1;comment:名称"` Version string `json:"version" gorm:"type:varchar(50);not null;index:idx_n_v,unique,priority:2;comment:版本"` Port int32 `json:"port" gorm:"type:int;not null;comment:应用端口"` Key string `json:"key" gorm:"type:varchar(255);not null;comment:部署包的路劲"` FileName string `json:"fileName" gorm:"type:varchar(100);not null;comment:部署包的文件名"` }
type DeployTask ¶
type DeployTask struct { Id int64 `json:"id" gorm:"type:bigint(20);primaryKey;autoIncrement;comment:主键ID"` UploadPath string `json:"uploadPath" gorm:"type:varchar(255);not null;comment:部署包的上传路劲"` AppId int64 `json:"appId" gorm:"type:bigint(20);not null;comment:关联的应用ID"` ScriptId int64 `json:"scriptId" gorm:"type:bigint(20);not null;comment:关联的部署脚本ID"` HostGroupId int64 `json:"hostGroupId" gorm:"type:bigint(20);not null;comment:关联的服务器分组ID"` Task *Task `json:"task" gorm:"polymorphic:Association;polymorphicValue:deploy"` // 多态 }
func (*DeployTask) TableName ¶
func (*DeployTask) TableName() string
type ExecuteType ¶
type ExecuteType int8
const ( ExecuteTypeManual ExecuteType = 0 // 执行方式 - 手动执行 ExecuteTypeAuto ExecuteType = 1 // 执行方式 - 自动执行,根据cron表达式 )
type Group ¶
type Host ¶
type Host struct { model.Base Name string `json:"name" gorm:"type:varchar(50);not null;index:idx_name;comment:名称"` Ip string `json:"ip" gorm:"type:varchar(50);not null;index:idx_ip,unique;comment:IP"` Port int32 `json:"port" gorm:"type:int;not null;comment:ssh端口"` User string `json:"user" gorm:"type:varchar(50);not null;comment:ssh用户名"` Password string `json:"password" gorm:"type:varchar(255);not null;comment:ssh密码"` SortNum int32 `json:"sortNum" gorm:"type:int;default:0;comment:顺序"` }
type HostGroup ¶
type HostGroup struct { Id int64 `json:"id" gorm:"primaryKey;type:bigint(20);autoIncrement;comment:主键ID"` HostId int64 `json:"hostId" gorm:"type:bigint(20);not null;index:idx_h_g_id,unique,priority:2;index:idx_h_id;comment:主机ID"` GroupId int64 `json:"groupId" gorm:"type:bigint(20);not null;index:idx_h_g_id,unique,priority:1;comment:分组ID"` }
type Script ¶
type Script struct { model.Base Name string `json:"name" gorm:"type:varchar(50);not null;index:idx_n_v,unique,priority:1;comment:名称"` Version string `json:"version" gorm:"type:varchar(50);not null;index:idx_n_v,unique,priority:2;comment:版本"` Content string `json:"content" gorm:"type:varchar(10000);not null;comment:脚本内容"` Description string `json:"description" gorm:"type:varchar(2000);not null;comment:使用说明"` }
type Task ¶
type Task struct { model.Base Name string `json:"name" gorm:"type:varchar(50);not null;index:idx_name;comment:名称"` Type int8 `json:"type" gorm:"type:tinyint(4);not null;comment:任务类型"` Status int8 `json:"status" gorm:"type:tinyint(4);default:0;comment:任务状态"` AssociationID int64 `json:"associationId" gorm:"type:bigint(20);not null;comment:关联的具体任务的ID"` AssociationType string `json:"associationType" gorm:"type:varchar(50);not null;comment:关联的具体任务表类型"` Cron string `json:"cron" gorm:"type:varchar(50);comment:cron表达式"` ExecuteType int8 `json:"executeType" gorm:"type:tinyint(4);default:0;comment:执行方式"` }
type TaskStatus ¶
type TaskStatus int8
const ( TaskStatusNotRunning TaskStatus = 0 // 任务状态 - 未运行 TaskStatusRunning TaskStatus = 1 // 任务状态 - 运行中 TaskStatusComplete TaskStatus = 2 // 任务状态 - 已完成 TaskStatusStopped TaskStatus = 3 // 任务状态 - 已停止 )
Click to show internal directories.
Click to hide internal directories.