2022-12-14 15:08:21 +08:00
|
|
|
package request
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/app/dto"
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/constant"
|
|
|
|
)
|
|
|
|
|
|
|
|
type AppSearch struct {
|
|
|
|
dto.PageInfo
|
2023-02-08 16:21:17 +08:00
|
|
|
Name string `json:"name"`
|
|
|
|
Tags []string `json:"tags"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Recommend bool `json:"recommend"`
|
2023-09-26 22:50:16 +08:00
|
|
|
Resource string `json:"resource"`
|
2022-12-14 15:08:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstallCreate struct {
|
2023-05-17 21:48:09 +08:00
|
|
|
AppDetailId uint `json:"appDetailId" validate:"required"`
|
|
|
|
Params map[string]interface{} `json:"params"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Services map[string]string `json:"services"`
|
|
|
|
AppContainerConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppContainerConfig struct {
|
|
|
|
Advanced bool `json:"advanced"`
|
|
|
|
CpuQuota float64 `json:"cpuQuota"`
|
|
|
|
MemoryLimit float64 `json:"memoryLimit"`
|
|
|
|
MemoryUnit string `json:"memoryUnit"`
|
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
AllowPort bool `json:"allowPort"`
|
2023-05-22 19:19:40 +08:00
|
|
|
EditCompose bool `json:"editCompose"`
|
|
|
|
DockerCompose string `json:"dockerCompose"`
|
2023-11-03 15:39:38 +08:00
|
|
|
HostMode bool `json:"hostMode"`
|
2024-01-30 16:11:41 +08:00
|
|
|
PullImage bool `json:"pullImage"`
|
2022-12-14 15:08:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstalledSearch struct {
|
|
|
|
dto.PageInfo
|
2023-01-16 15:30:24 +08:00
|
|
|
Type string `json:"type"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Tags []string `json:"tags"`
|
|
|
|
Update bool `json:"update"`
|
|
|
|
Unused bool `json:"unused"`
|
2023-10-27 15:13:25 +08:00
|
|
|
All bool `json:"all"`
|
2024-05-29 18:41:13 +08:00
|
|
|
Sync bool `json:"sync"`
|
2022-12-14 15:08:21 +08:00
|
|
|
}
|
|
|
|
|
2023-08-29 10:50:15 +08:00
|
|
|
type AppInstalledInfo struct {
|
|
|
|
Key string `json:"key" validate:"required"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
2022-12-14 15:08:21 +08:00
|
|
|
type AppBackupSearch struct {
|
|
|
|
dto.PageInfo
|
|
|
|
AppInstallID uint `json:"appInstallID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppBackupDelete struct {
|
|
|
|
Ids []uint `json:"ids"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstalledOperate struct {
|
2024-06-04 16:50:31 +08:00
|
|
|
InstallId uint `json:"installId" validate:"required"`
|
|
|
|
BackupId uint `json:"backupId"`
|
|
|
|
DetailId uint `json:"detailId"`
|
|
|
|
Operate constant.AppOperate `json:"operate" validate:"required"`
|
|
|
|
ForceDelete bool `json:"forceDelete"`
|
|
|
|
DeleteBackup bool `json:"deleteBackup"`
|
|
|
|
DeleteDB bool `json:"deleteDB"`
|
|
|
|
Backup bool `json:"backup"`
|
|
|
|
PullImage bool `json:"pullImage"`
|
|
|
|
DockerCompose string `json:"dockerCompose"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstallUpgrade struct {
|
|
|
|
InstallID uint `json:"installId"`
|
|
|
|
DetailID uint `json:"detailId"`
|
|
|
|
Backup bool `json:"backup"`
|
|
|
|
PullImage bool `json:"pullImage"`
|
|
|
|
DockerCompose string `json:"dockerCompose"`
|
2022-12-14 15:08:21 +08:00
|
|
|
}
|
|
|
|
|
2023-03-08 11:04:22 +08:00
|
|
|
type AppInstalledUpdate struct {
|
2023-05-18 16:48:19 +08:00
|
|
|
InstallId uint `json:"installId" validate:"required"`
|
|
|
|
Params map[string]interface{} `json:"params" validate:"required"`
|
|
|
|
AppContainerConfig
|
2023-03-08 11:04:22 +08:00
|
|
|
}
|
|
|
|
|
2023-07-03 16:36:18 +08:00
|
|
|
type AppInstalledIgnoreUpgrade struct {
|
2023-07-06 18:48:22 +08:00
|
|
|
DetailID uint `json:"detailID" validate:"required"`
|
|
|
|
Operate string `json:"operate" validate:"required,oneof=cancel ignore"`
|
2023-07-03 16:36:18 +08:00
|
|
|
}
|
|
|
|
|
2022-12-14 15:08:21 +08:00
|
|
|
type PortUpdate struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Port int64 `json:"port"`
|
|
|
|
}
|
2024-06-04 16:50:31 +08:00
|
|
|
|
|
|
|
type AppUpdateVersion struct {
|
|
|
|
AppInstallID uint `json:"appInstallID" validate:"required"`
|
|
|
|
UpdateVersion string `json:"updateVersion"`
|
|
|
|
}
|