2022-12-14 15:26:51 +08:00
|
|
|
package request
|
|
|
|
|
|
|
|
import "github.com/1Panel-dev/1Panel/backend/app/dto"
|
|
|
|
|
|
|
|
type WebsiteSSLSearch struct {
|
|
|
|
dto.PageInfo
|
2023-07-13 14:17:18 +08:00
|
|
|
AcmeAccountID string `json:"acmeAccountID"`
|
2022-12-14 15:26:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteSSLCreate struct {
|
|
|
|
PrimaryDomain string `json:"primaryDomain" validate:"required"`
|
|
|
|
OtherDomains string `json:"otherDomains"`
|
|
|
|
Provider string `json:"provider" validate:"required"`
|
|
|
|
AcmeAccountID uint `json:"acmeAccountId" validate:"required"`
|
|
|
|
DnsAccountID uint `json:"dnsAccountId"`
|
2023-11-03 18:19:45 +08:00
|
|
|
AutoRenew bool `json:"autoRenew"`
|
2023-11-16 14:38:07 +08:00
|
|
|
KeyType string `json:"keyType"`
|
2023-11-20 10:44:10 +08:00
|
|
|
Apply bool `json:"apply"`
|
2023-11-27 14:00:09 +08:00
|
|
|
PushDir bool `json:"pushDir"`
|
|
|
|
Dir string `json:"dir"`
|
2023-11-29 10:48:09 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
Description string `json:"description"`
|
2022-12-14 15:26:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteDNSReq struct {
|
|
|
|
Domains []string `json:"domains" validate:"required"`
|
|
|
|
AcmeAccountID uint `json:"acmeAccountId" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteSSLRenew struct {
|
|
|
|
SSLID uint `json:"SSLId" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2023-11-20 10:44:10 +08:00
|
|
|
type WebsiteSSLApply struct {
|
2024-01-09 15:55:34 +08:00
|
|
|
ID uint `json:"ID" validate:"required"`
|
|
|
|
SkipDNSCheck bool `json:"SkipDNSCheck"`
|
2023-11-20 10:44:10 +08:00
|
|
|
}
|
|
|
|
|
2022-12-14 15:26:51 +08:00
|
|
|
type WebsiteAcmeAccountCreate struct {
|
2023-11-14 18:44:09 +08:00
|
|
|
Email string `json:"email" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required,oneof=letsencrypt zerossl buypass google"`
|
2023-11-16 14:38:07 +08:00
|
|
|
KeyType string `json:"keyType" validate:"required,oneof=P256 P384 2048 3072 4096 8192"`
|
2023-11-14 18:44:09 +08:00
|
|
|
EabKid string `json:"eabKid"`
|
|
|
|
EabHmacKey string `json:"eabHmacKey"`
|
2022-12-14 15:26:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteDnsAccountCreate struct {
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Authorization map[string]string `json:"authorization" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteDnsAccountUpdate struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Authorization map[string]string `json:"authorization" validate:"required"`
|
|
|
|
}
|
2022-12-22 10:30:32 +08:00
|
|
|
|
|
|
|
type WebsiteResourceReq struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
}
|
2023-03-21 14:42:50 +08:00
|
|
|
|
2023-11-27 17:00:09 +08:00
|
|
|
type WebsiteBatchDelReq struct {
|
|
|
|
IDs []uint `json:"ids" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2023-03-21 14:42:50 +08:00
|
|
|
type WebsiteSSLUpdate struct {
|
2023-11-28 15:42:10 +08:00
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
AutoRenew bool `json:"autoRenew"`
|
|
|
|
Description string `json:"description"`
|
2023-03-21 14:42:50 +08:00
|
|
|
}
|
2023-10-31 16:01:50 +08:00
|
|
|
|
|
|
|
type WebsiteSSLUpload struct {
|
|
|
|
PrivateKey string `json:"privateKey"`
|
|
|
|
Certificate string `json:"certificate"`
|
|
|
|
PrivateKeyPath string `json:"privateKeyPath"`
|
|
|
|
CertificatePath string `json:"certificatePath"`
|
|
|
|
Type string `json:"type" validate:"required,oneof=paste local"`
|
2023-11-28 15:42:10 +08:00
|
|
|
SSLID uint `json:"sslID"`
|
2023-11-30 14:08:08 +08:00
|
|
|
Description string `json:"description"`
|
2023-10-31 16:01:50 +08:00
|
|
|
}
|
2023-11-27 12:04:09 +08:00
|
|
|
|
|
|
|
type WebsiteCASearch struct {
|
|
|
|
dto.PageInfo
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteCACreate struct {
|
|
|
|
CommonName string `json:"commonName" validate:"required"`
|
|
|
|
Country string `json:"country" validate:"required"`
|
|
|
|
Organization string `json:"organization" validate:"required"`
|
|
|
|
OrganizationUint string `json:"organizationUint"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
KeyType string `json:"keyType" validate:"required,oneof=P256 P384 2048 3072 4096 8192"`
|
|
|
|
Province string `json:"province" `
|
|
|
|
City string `json:"city"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteCAObtain struct {
|
2023-11-30 14:08:08 +08:00
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Domains string `json:"domains" validate:"required"`
|
|
|
|
KeyType string `json:"keyType" validate:"required,oneof=P256 P384 2048 3072 4096 8192"`
|
|
|
|
Time int `json:"time" validate:"required"`
|
|
|
|
Unit string `json:"unit" validate:"required"`
|
|
|
|
PushDir bool `json:"pushDir"`
|
|
|
|
Dir string `json:"dir"`
|
|
|
|
AutoRenew bool `json:"autoRenew"`
|
|
|
|
Renew bool `json:"renew"`
|
|
|
|
SSLID uint `json:"sslID"`
|
|
|
|
Description string `json:"description"`
|
2023-11-27 18:36:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type WebsiteCARenew struct {
|
|
|
|
SSLID uint `json:"SSLID" validate:"required"`
|
2023-11-27 12:04:09 +08:00
|
|
|
}
|