1Panel/backend/app/dto/website_ssl.go
2022-11-20 22:54:59 +08:00

48 lines
1.1 KiB
Go

package dto
import "github.com/1Panel-dev/1Panel/backend/app/model"
type WebsiteSSLDTO struct {
model.WebSiteSSL
}
type SSLProvider string
const (
DNSAccount = "dnsAccount"
DnsManual = "dnsManual"
Http = "http"
)
type WebsiteSSLSearch struct {
PageInfo
}
type WebsiteSSLCreate struct {
PrimaryDomain string `json:"primaryDomain" validate:"required"`
OtherDomains string `json:"otherDomains"`
Provider SSLProvider `json:"provider" validate:"required"`
AcmeAccountID uint `json:"acmeAccountId" validate:"required"`
DnsAccountID uint `json:"dnsAccountId"`
}
type WebsiteSSLApply struct {
WebsiteID uint `json:"websiteId" validate:"required"`
Enable bool `json:"enable" validate:"required"`
}
type WebsiteDNSReq struct {
Domains []string `json:"domains" validate:"required"`
AcmeAccountID uint `json:"acmeAccountId" validate:"required"`
}
type WebsiteDNSRes struct {
Key string `json:"resolve"`
Value string `json:"value"`
Type string `json:"type"`
}
type WebsiteSSLRenew struct {
SSLID uint `json:"SSLId" validate:"required"`
}