2022-09-22 08:16:04 +00:00
|
|
|
package dto
|
|
|
|
|
2022-09-30 09:56:06 +00:00
|
|
|
import (
|
2023-05-16 09:31:47 +00:00
|
|
|
"github.com/1Panel-dev/1Panel/backend/app/model"
|
2022-09-26 10:20:21 +00:00
|
|
|
)
|
|
|
|
|
2022-10-09 15:35:24 +00:00
|
|
|
type AppDatabase struct {
|
|
|
|
ServiceName string `json:"PANEL_DB_HOST"`
|
|
|
|
DbName string `json:"PANEL_DB_NAME"`
|
|
|
|
DbUser string `json:"PANEL_DB_USER"`
|
|
|
|
Password string `json:"PANEL_DB_USER_PASSWORD"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AuthParam struct {
|
|
|
|
RootPassword string `json:"PANEL_DB_ROOT_PASSWORD"`
|
|
|
|
}
|
|
|
|
|
2023-08-03 10:36:01 +00:00
|
|
|
type RedisAuthParam struct {
|
|
|
|
RootPassword string `json:"PANEL_REDIS_ROOT_PASSWORD"`
|
|
|
|
}
|
|
|
|
|
2022-10-09 15:35:24 +00:00
|
|
|
type ContainerExec struct {
|
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
DbParam AppDatabase `json:"dbParam"`
|
|
|
|
Auth AuthParam `json:"auth"`
|
|
|
|
}
|
2022-10-13 10:56:53 +00:00
|
|
|
|
2022-10-14 06:48:55 +00:00
|
|
|
type AppOssConfig struct {
|
|
|
|
Version string `json:"version"`
|
|
|
|
Package string `json:"package"`
|
|
|
|
}
|
|
|
|
|
2022-10-13 10:56:53 +00:00
|
|
|
type AppVersion struct {
|
|
|
|
Version string `json:"version"`
|
|
|
|
DetailId uint `json:"detailId"`
|
|
|
|
}
|
2022-10-14 06:48:55 +00:00
|
|
|
|
|
|
|
type AppList struct {
|
2023-05-15 14:40:05 +00:00
|
|
|
Valid bool `json:"valid"`
|
|
|
|
Violations []string `json:"violations"`
|
|
|
|
LastModified int `json:"lastModified"`
|
|
|
|
|
|
|
|
Apps []AppDefine `json:"apps"`
|
|
|
|
Extra ExtraProperties `json:"additionalProperties"`
|
2022-10-14 06:48:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppDefine struct {
|
2023-05-15 14:40:05 +00:00
|
|
|
Icon string `json:"icon"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
ReadMe string `json:"readMe"`
|
|
|
|
LastModified int `json:"lastModified"`
|
|
|
|
|
|
|
|
AppProperty AppProperty `json:"additionalProperties"`
|
|
|
|
Versions []AppConfigVersion `json:"versions"`
|
|
|
|
}
|
|
|
|
|
2023-05-16 09:31:47 +00:00
|
|
|
type LocalAppAppDefine struct {
|
|
|
|
AppProperty model.App `json:"additionalProperties" yaml:"additionalProperties"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LocalAppParam struct {
|
|
|
|
AppParams LocalAppInstallDefine `json:"additionalProperties" yaml:"additionalProperties"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LocalAppInstallDefine struct {
|
|
|
|
FormFields interface{} `json:"formFields" yaml:"formFields"`
|
|
|
|
}
|
|
|
|
|
2023-05-15 14:40:05 +00:00
|
|
|
type ExtraProperties struct {
|
2023-08-25 10:44:11 +00:00
|
|
|
Tags []Tag `json:"tags"`
|
|
|
|
Version string `json:"version"`
|
2023-05-15 14:40:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppProperty struct {
|
2022-11-22 06:32:45 +00:00
|
|
|
Name string `json:"name"`
|
2023-05-15 14:40:05 +00:00
|
|
|
Type string `json:"type"`
|
2022-11-22 06:32:45 +00:00
|
|
|
Tags []string `json:"tags"`
|
2023-02-17 08:21:13 +00:00
|
|
|
ShortDescZh string `json:"shortDescZh"`
|
|
|
|
ShortDescEn string `json:"shortDescEn"`
|
2023-05-15 14:40:05 +00:00
|
|
|
Key string `json:"key"`
|
2022-10-14 06:48:55 +00:00
|
|
|
Required []string `json:"Required"`
|
|
|
|
CrossVersionUpdate bool `json:"crossVersionUpdate"`
|
2022-11-22 06:32:45 +00:00
|
|
|
Limit int `json:"limit"`
|
2023-02-08 08:21:17 +00:00
|
|
|
Recommend int `json:"recommend"`
|
2023-01-30 09:24:46 +00:00
|
|
|
Website string `json:"website"`
|
|
|
|
Github string `json:"github"`
|
|
|
|
Document string `json:"document"`
|
2022-10-14 06:48:55 +00:00
|
|
|
}
|
|
|
|
|
2023-05-15 14:40:05 +00:00
|
|
|
type AppConfigVersion struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
LastModified int `json:"lastModified"`
|
|
|
|
DownloadUrl string `json:"downloadUrl"`
|
|
|
|
DownloadCallBackUrl string `json:"downloadCallBackUrl"`
|
|
|
|
AppForm interface{} `json:"additionalProperties"`
|
|
|
|
}
|
|
|
|
|
2022-10-14 06:48:55 +00:00
|
|
|
type Tag struct {
|
|
|
|
Key string `json:"key"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppForm struct {
|
2023-01-03 06:57:13 +00:00
|
|
|
FormFields []AppFormFields `json:"formFields"`
|
2022-10-14 06:48:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type AppFormFields struct {
|
2023-03-22 07:38:30 +00:00
|
|
|
Type string `json:"type"`
|
|
|
|
LabelZh string `json:"labelZh"`
|
|
|
|
LabelEn string `json:"labelEn"`
|
|
|
|
Required bool `json:"required"`
|
|
|
|
Default interface{} `json:"default"`
|
|
|
|
EnvKey string `json:"envKey"`
|
|
|
|
Disabled bool `json:"disabled"`
|
|
|
|
Edit bool `json:"edit"`
|
|
|
|
Rule string `json:"rule"`
|
2023-04-02 08:54:00 +00:00
|
|
|
Multiple bool `json:"multiple"`
|
2023-05-15 14:40:05 +00:00
|
|
|
Child interface{} `json:"child"`
|
2023-03-22 07:38:30 +00:00
|
|
|
Values []AppFormValue `json:"values"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AppFormValue struct {
|
|
|
|
Label string `json:"label"`
|
|
|
|
Value string `json:"value"`
|
2022-10-14 06:48:55 +00:00
|
|
|
}
|
2022-12-01 11:25:02 +00:00
|
|
|
|
|
|
|
type AppResource struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|
2022-12-09 08:03:00 +00:00
|
|
|
|
|
|
|
var AppToolMap = map[string]string{
|
|
|
|
"mysql": "phpmyadmin",
|
|
|
|
"redis": "redis-commander",
|
|
|
|
}
|
2023-08-23 14:44:14 +00:00
|
|
|
|
|
|
|
type AppInstallInfo struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
Key string `json:"key"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
}
|