Documentation
¶
Index ¶
Constants ¶
View Source
const ( SettingKeyName = "name" SettingKeyVersion = "version" SettingKeyMonitor = "monitor" SettingKeyMonitorDays = "monitor_days" SettingKeyBackupPath = "backup_path" SettingKeyWebsitePath = "website_path" SettingKeyMysqlRootPassword = "mysql_root_password" SettingKeySshHost = "ssh_host" SettingKeySshPort = "ssh_port" SettingKeySshUser = "ssh_user" SettingKeySshPassword = "ssh_password" )
View Source
const ( TaskStatusWaiting = "waiting" TaskStatusRunning = "running" TaskStatusSuccess = "finished" TaskStatusFailed = "failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cert ¶
type Cert struct {
orm.Model
UserID uint `gorm:"not null" json:"user_id"` // 关联的 ACME 用户 ID
WebsiteID uint `gorm:"not null" json:"website_id"` // 关联的网站 ID
DNSID uint `gorm:"not null" json:"dns_id"` // 关联的 DNS ID
Type string `gorm:"not null" json:"type"` // 证书类型 (P256, P384, 2048, 4096)
Domains []string `gorm:"not null;serializer:json" json:"domains"`
AutoRenew bool `gorm:"not null" json:"auto_renew"` // 自动续签
CertURL string `gorm:"not null" json:"cert_url"` // 证书 URL (续签时使用)
Cert string `gorm:"not null" json:"cert"` // 证书内容
Key string `gorm:"not null" json:"key"` // 私钥内容
Website *Website `gorm:"foreignKey:WebsiteID" json:"website"`
User *CertUser `gorm:"foreignKey:UserID" json:"user"`
DNS *CertDNS `gorm:"foreignKey:DNSID" json:"dns"`
}
type CertUser ¶
type CertUser struct {
orm.Model
Email string `gorm:"not null" json:"email"`
CA string `gorm:"not null" json:"ca"` // CA 提供商 (letsencrypt, zerossl, sslcom, google, buypass)
Kid string `gorm:"not null" json:"kid"`
HmacEncoded string `gorm:"not null" json:"hmac_encoded"`
PrivateKey string `gorm:"not null" json:"private_key"`
KeyType string `gorm:"not null" json:"key_type"`
Certs []*Cert `gorm:"foreignKey:UserID" json:"-"`
}
type Database ¶
type Database struct {
orm.Model
Name string `gorm:"not null;unique" json:"name"`
Type string `gorm:"not null" json:"type"`
Host string `gorm:"not null" json:"host"`
Port int `gorm:"not null" json:"port"`
Username string `gorm:"not null" json:"username"`
Password string `gorm:"not null" json:"password"`
Remark string `gorm:"not null" json:"remark"`
}
type Monitor ¶
type Monitor struct {
orm.Model
Info tools.MonitoringInfo `gorm:"not null;serializer:json" json:"info"`
}
type Website ¶
type Website struct {
orm.Model
Name string `gorm:"not null;unique" json:"name"`
Status bool `gorm:"not null;default:true" json:"status"`
Path string `gorm:"not null" json:"path"`
PHP int `gorm:"not null" json:"php"`
SSL bool `gorm:"not null" json:"ssl"`
Remark string `gorm:"not null" json:"remark"`
Cert *Cert `gorm:"foreignKey:WebsiteID" json:"cert"`
}
Click to show internal directories.
Click to hide internal directories.