2022-12-13 09:20:13 +00:00
|
|
|
package request
|
|
|
|
|
2022-12-30 02:31:54 +00:00
|
|
|
import (
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/app/dto"
|
|
|
|
)
|
2022-12-13 09:20:13 +00:00
|
|
|
|
|
|
|
type WebsiteSearch struct {
|
|
|
|
dto.PageInfo
|
2022-12-30 08:13:13 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
WebsiteGroupID uint `json:"websiteGroupId"`
|
2022-12-13 09:20:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteCreate struct {
|
|
|
|
PrimaryDomain string `json:"primaryDomain" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Alias string `json:"alias" validate:"required"`
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
OtherDomains string `json:"otherDomains"`
|
|
|
|
Proxy string `json:"proxy"`
|
|
|
|
WebsiteGroupID uint `json:"webSiteGroupID" validate:"required"`
|
|
|
|
|
|
|
|
AppType string `json:"appType" validate:"oneof=new installed"`
|
|
|
|
AppInstall NewAppInstall `json:"appInstall"`
|
|
|
|
AppID uint `json:"appID"`
|
|
|
|
AppInstallID uint `json:"appInstallID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NewAppInstall struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
AppDetailId uint `json:"appDetailID"`
|
|
|
|
Params map[string]interface{} `json:"params"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteInstallCheckReq struct {
|
|
|
|
InstallIds []uint `json:"InstallIds" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteUpdate struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
PrimaryDomain string `json:"primaryDomain" validate:"required"`
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
WebsiteGroupID uint `json:"webSiteGroupID" validate:"required"`
|
2022-12-30 02:31:54 +00:00
|
|
|
ExpireDate string `json:"expireDate"`
|
2022-12-13 09:20:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteDelete struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
DeleteApp bool `json:"deleteApp"`
|
|
|
|
DeleteBackup bool `json:"deleteBackup"`
|
|
|
|
ForceDelete bool `json:"forceDelete"`
|
|
|
|
}
|
|
|
|
|
2022-12-26 08:09:21 +00:00
|
|
|
type WebsiteOp struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Operate string `json:"operate"`
|
|
|
|
}
|
|
|
|
|
2022-12-13 09:20:13 +00:00
|
|
|
type WebsiteWafReq struct {
|
|
|
|
WebsiteID uint `json:"websiteId" validate:"required"`
|
|
|
|
Key string `json:"key" validate:"required"`
|
|
|
|
Rule string `json:"rule" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteWafUpdate struct {
|
|
|
|
WebsiteID uint `json:"websiteId" validate:"required"`
|
|
|
|
Key string `json:"key" validate:"required"`
|
|
|
|
Enable bool `json:"enable" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteRecover struct {
|
|
|
|
WebsiteName string `json:"websiteName" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
BackupName string `json:"backupName" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteRecoverByFile struct {
|
|
|
|
WebsiteName string `json:"websiteName" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
FileDir string `json:"fileDir" validate:"required"`
|
|
|
|
FileName string `json:"fileName" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteGroupCreate struct {
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteGroupUpdate struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Default bool `json:"default"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteDomainCreate struct {
|
|
|
|
WebsiteID uint `json:"websiteId" validate:"required"`
|
|
|
|
Port int `json:"port" validate:"required"`
|
|
|
|
Domain string `json:"domain" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteDomainDelete struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteHTTPSOp struct {
|
2022-12-28 10:59:05 +00:00
|
|
|
WebsiteID uint `json:"websiteId" validate:"required"`
|
|
|
|
Enable bool `json:"enable" validate:"required"`
|
|
|
|
WebsiteSSLID uint `json:"websiteSSLId"`
|
|
|
|
Type string `json:"type" validate:"oneof=existed auto manual"`
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
Certificate string `json:"certificate"`
|
|
|
|
HttpConfig string `json:"HttpConfig" validate:"oneof=HTTPSOnly HTTPAlso HTTPToHTTPS"`
|
|
|
|
SSLProtocol []string `json:"SSLProtocol"`
|
|
|
|
Algorithm string `json:"algorithm"`
|
2022-12-13 09:20:13 +00:00
|
|
|
}
|
2022-12-28 03:37:04 +00:00
|
|
|
|
|
|
|
type WebsiteNginxUpdate struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Content string `json:"content" validate:"required"`
|
|
|
|
}
|
2022-12-30 09:39:17 +00:00
|
|
|
|
|
|
|
type WebsiteLogReq struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Operate string `json:"operate" validate:"required"`
|
|
|
|
LogType string `json:"logType" validate:"required"`
|
|
|
|
}
|
2023-01-03 08:56:36 +00:00
|
|
|
|
|
|
|
type WebsiteDefaultUpdate struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
}
|