2022-12-14 15:08:21 +08:00
|
|
|
package response
|
|
|
|
|
|
|
|
import (
|
2023-05-15 22:40:05 +08:00
|
|
|
"github.com/1Panel-dev/1Panel/backend/app/dto"
|
2022-12-14 15:08:21 +08:00
|
|
|
"time"
|
2023-04-11 10:26:25 +08:00
|
|
|
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/app/model"
|
2022-12-14 15:08:21 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type AppRes struct {
|
2023-02-14 11:17:02 +08:00
|
|
|
Items []*AppDTO `json:"items"`
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppUpdateRes struct {
|
2023-05-15 22:40:05 +08:00
|
|
|
CanUpdate bool `json:"canUpdate"`
|
|
|
|
AppStoreLastModified int `json:"appStoreLastModified"`
|
|
|
|
List dto.AppList `json:"list"`
|
2022-12-14 15:08:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppDTO struct {
|
|
|
|
model.App
|
|
|
|
Versions []string `json:"versions"`
|
|
|
|
Tags []model.Tag `json:"tags"`
|
|
|
|
}
|
|
|
|
|
2023-01-16 15:30:24 +08:00
|
|
|
type TagDTO struct {
|
|
|
|
model.Tag
|
|
|
|
}
|
|
|
|
|
2022-12-14 15:08:21 +08:00
|
|
|
type AppInstalledCheck struct {
|
|
|
|
IsExist bool `json:"isExist"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
App string `json:"app"`
|
|
|
|
Version string `json:"version"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
LastBackupAt string `json:"lastBackupAt"`
|
|
|
|
AppInstallID uint `json:"appInstallId"`
|
|
|
|
ContainerName string `json:"containerName"`
|
2022-12-21 17:36:14 +08:00
|
|
|
InstallPath string `json:"installPath"`
|
2022-12-14 15:08:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppDetailDTO struct {
|
|
|
|
model.AppDetail
|
|
|
|
Enable bool `json:"enable"`
|
|
|
|
Params interface{} `json:"params"`
|
2023-04-02 16:54:00 +08:00
|
|
|
Image string `json:"image"`
|
2022-12-14 15:08:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppInstalledDTO struct {
|
|
|
|
model.AppInstall
|
|
|
|
Total int `json:"total"`
|
|
|
|
Ready int `json:"ready"`
|
|
|
|
AppName string `json:"appName"`
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
CanUpdate bool `json:"canUpdate"`
|
|
|
|
}
|
|
|
|
|
2023-04-11 10:26:25 +08:00
|
|
|
type DatabaseConn struct {
|
|
|
|
Password string `json:"password"`
|
|
|
|
ServiceName string `json:"serviceName"`
|
2023-04-18 15:30:57 +08:00
|
|
|
Port int64 `json:"port"`
|
2023-04-11 10:26:25 +08:00
|
|
|
}
|
|
|
|
|
2022-12-14 15:08:21 +08:00
|
|
|
type AppService struct {
|
|
|
|
Label string `json:"label"`
|
|
|
|
Value string `json:"value"`
|
|
|
|
Config interface{} `json:"config"`
|
|
|
|
}
|
2023-01-03 14:57:13 +08:00
|
|
|
|
|
|
|
type AppParam struct {
|
2023-03-22 15:38:30 +08:00
|
|
|
Value interface{} `json:"value"`
|
|
|
|
Edit bool `json:"edit"`
|
|
|
|
Key string `json:"key"`
|
|
|
|
Rule string `json:"rule"`
|
|
|
|
LabelZh string `json:"labelZh"`
|
|
|
|
LabelEn string `json:"labelEn"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Values interface{} `json:"values"`
|
|
|
|
ShowValue string `json:"showValue"`
|
2023-04-02 16:54:00 +08:00
|
|
|
Required bool `json:"required"`
|
|
|
|
Multiple bool `json:"multiple"`
|
2023-01-03 14:57:13 +08:00
|
|
|
}
|
2023-05-17 15:46:29 +08:00
|
|
|
|
|
|
|
type AppConfig struct {
|
|
|
|
Params []AppParam `json:"params"`
|
|
|
|
CpuQuota float64 `json:"cpuQuota"`
|
|
|
|
MemoryLimit float64 `json:"memoryLimit"`
|
|
|
|
MemoryUnit string `json:"memoryUnit"`
|
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
AllowPort bool `json:"allowPort"`
|
|
|
|
}
|