2024-07-23 14:48:37 +08:00
|
|
|
package request
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/1Panel-dev/1Panel/agent/app/dto"
|
2024-08-06 14:41:40 +08:00
|
|
|
"github.com/1Panel-dev/1Panel/agent/app/model"
|
2024-07-23 14:48:37 +08:00
|
|
|
"github.com/1Panel-dev/1Panel/agent/constant"
|
|
|
|
)
|
|
|
|
|
|
|
|
type AppSearch struct {
|
|
|
|
dto.PageInfo
|
2024-08-22 15:08:55 +08:00
|
|
|
Name string `json:"name"`
|
|
|
|
Tags []string `json:"tags"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Recommend bool `json:"recommend"`
|
|
|
|
Resource string `json:"resource"`
|
|
|
|
ShowCurrentArch bool `json:"showCurrentArch"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstallCreate struct {
|
|
|
|
AppDetailId uint `json:"appDetailId" validate:"required"`
|
|
|
|
Params map[string]interface{} `json:"params"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Services map[string]string `json:"services"`
|
2024-08-01 15:31:44 +08:00
|
|
|
TaskID string `json:"taskID"`
|
2024-07-23 14:48:37 +08:00
|
|
|
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"`
|
|
|
|
EditCompose bool `json:"editCompose"`
|
|
|
|
DockerCompose string `json:"dockerCompose"`
|
|
|
|
HostMode bool `json:"hostMode"`
|
|
|
|
PullImage bool `json:"pullImage"`
|
2024-08-26 13:40:27 +08:00
|
|
|
GpuConfig bool `json:"gpuConfig"`
|
2024-08-26 15:37:13 +08:00
|
|
|
WebUI string `json:"webUI"`
|
|
|
|
Type string `json:"type"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstalledSearch struct {
|
|
|
|
dto.PageInfo
|
|
|
|
Type string `json:"type"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Tags []string `json:"tags"`
|
|
|
|
Update bool `json:"update"`
|
|
|
|
Unused bool `json:"unused"`
|
|
|
|
All bool `json:"all"`
|
|
|
|
Sync bool `json:"sync"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstalledInfo struct {
|
|
|
|
Key string `json:"key" validate:"required"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppBackupSearch struct {
|
|
|
|
dto.PageInfo
|
|
|
|
AppInstallID uint `json:"appInstallID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppBackupDelete struct {
|
|
|
|
Ids []uint `json:"ids"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstalledOperate struct {
|
|
|
|
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"`
|
2024-08-02 16:00:15 +08:00
|
|
|
TaskID string `json:"taskID"`
|
2024-08-06 14:41:40 +08:00
|
|
|
DeleteImage bool `json:"deleteImage"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstallUpgrade struct {
|
|
|
|
InstallID uint `json:"installId"`
|
|
|
|
DetailID uint `json:"detailId"`
|
|
|
|
Backup bool `json:"backup"`
|
|
|
|
PullImage bool `json:"pullImage"`
|
|
|
|
DockerCompose string `json:"dockerCompose"`
|
2024-08-02 16:00:15 +08:00
|
|
|
TaskID string `json:"taskID"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
|
2024-08-06 14:41:40 +08:00
|
|
|
type AppInstallDelete struct {
|
|
|
|
Install model.AppInstall
|
2024-08-06 16:28:30 +08:00
|
|
|
DeleteBackup bool `json:"deleteBackup"`
|
|
|
|
ForceDelete bool `json:"forceDelete"`
|
|
|
|
DeleteDB bool `json:"deleteDB"`
|
|
|
|
DeleteImage bool `json:"deleteImage"`
|
|
|
|
TaskID string `json:"taskID"`
|
2024-08-06 14:41:40 +08:00
|
|
|
}
|
|
|
|
|
2024-07-23 14:48:37 +08:00
|
|
|
type AppInstalledUpdate struct {
|
|
|
|
InstallId uint `json:"installId" validate:"required"`
|
|
|
|
Params map[string]interface{} `json:"params" validate:"required"`
|
|
|
|
AppContainerConfig
|
|
|
|
}
|
|
|
|
|
2024-08-26 15:37:13 +08:00
|
|
|
type AppConfigUpdate struct {
|
|
|
|
InstallID uint `json:"installID" validate:"required"`
|
|
|
|
WebUI string `json:"webUI"`
|
|
|
|
}
|
|
|
|
|
2024-07-23 14:48:37 +08:00
|
|
|
type AppInstalledIgnoreUpgrade struct {
|
|
|
|
DetailID uint `json:"detailID" validate:"required"`
|
|
|
|
Operate string `json:"operate" validate:"required,oneof=cancel ignore"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type PortUpdate struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Port int64 `json:"port"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppUpdateVersion struct {
|
|
|
|
AppInstallID uint `json:"appInstallID" validate:"required"`
|
|
|
|
UpdateVersion string `json:"updateVersion"`
|
|
|
|
}
|
2024-08-26 18:34:34 +08:00
|
|
|
|
|
|
|
type AppstoreUpdate struct {
|
|
|
|
DefaultDomain string `json:"defaultDomain"`
|
|
|
|
}
|