mirror of
https://github.com/tnb-labs/panel.git
synced 2026-09-01 14:55:12 +08:00
55 lines
1.7 KiB
Go
55 lines
1.7 KiB
Go
package request
|
|
|
|
// ToolboxMigrationConnection 迁移连接信息
|
|
type ToolboxMigrationConnection struct {
|
|
URL string `json:"url" validate:"required"`
|
|
TokenID uint `json:"token_id" validate:"required"`
|
|
Token string `json:"token" validate:"required"`
|
|
}
|
|
|
|
// ToolboxMigrationItems 迁移选择项
|
|
type ToolboxMigrationItems struct {
|
|
Websites []ToolboxMigrationWebsite `json:"websites"`
|
|
Databases []ToolboxMigrationDatabase `json:"databases"`
|
|
DatabaseUsers []ToolboxMigrationDatabaseUser `json:"database_users"`
|
|
StopOnMig bool `json:"stop_on_mig"` // 迁移中是否停止服务
|
|
}
|
|
|
|
// ToolboxMigrationWebsite 迁移网站项
|
|
type ToolboxMigrationWebsite struct {
|
|
ID uint `json:"id"`
|
|
Name string `json:"name"`
|
|
Path string `json:"path"` // 网站目录
|
|
}
|
|
|
|
// ToolboxMigrationDatabase 迁移数据库项
|
|
type ToolboxMigrationDatabase struct {
|
|
Type string `json:"type"` // mysql / postgresql
|
|
Name string `json:"name"`
|
|
ServerID uint `json:"server_id"`
|
|
Server string `json:"server"` // 服务器名称
|
|
}
|
|
|
|
// ToolboxMigrationDatabaseUser 迁移数据库用户项
|
|
type ToolboxMigrationDatabaseUser struct {
|
|
ID uint `json:"id"`
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
Host string `json:"host"` // 仅 mysql
|
|
ServerID uint `json:"server_id"`
|
|
Server string `json:"server"` // 服务器名称
|
|
Type string `json:"type"` // mysql / postgresql
|
|
}
|
|
|
|
// ToolboxMigrationProject 迁移项目项
|
|
type ToolboxMigrationProject struct {
|
|
ID uint `json:"id"`
|
|
Name string `json:"name"`
|
|
Path string `json:"path"` // 项目目录
|
|
}
|
|
|
|
// ToolboxMigrationExec 远程执行命令请求
|
|
type ToolboxMigrationExec struct {
|
|
Command string `json:"command" validate:"required"`
|
|
}
|