实现TLS配置

This commit is contained in:
GoEdgeLab
2020-10-01 16:51:15 +08:00
parent 5ed4393e2a
commit ba705b878f
3 changed files with 11 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
package serverconfigs package serverconfigs
// FTP源站配置 // FTP源站配置
type OriginFTPConfig struct { type FTPServerConfig struct {
Username string `yaml:"username" json:"username"` // 用户名 Username string `yaml:"username" json:"username"` // 用户名
Password string `yaml:"password" json:"password"` // 密码 Password string `yaml:"password" json:"password"` // 密码
Dir string `yaml:"dir" json:"dir"` // 目录 Dir string `yaml:"dir" json:"dir"` // 目录

View File

@@ -0,0 +1,6 @@
package serverconfigs
type FTPServerRef struct {
IsOn bool `yaml:"isOn" json:"isOn"`
FTPServerId int64 `yaml:"ftpServerId" json:"ftpServerId"`
}

View File

@@ -41,10 +41,12 @@ type OriginConfig struct {
// - http|https 返回2xx-3xx认为成功 // - http|https 返回2xx-3xx认为成功
HealthCheck *HealthCheckConfig `yaml:"healthCheck" json:"healthCheck"` HealthCheck *HealthCheckConfig `yaml:"healthCheck" json:"healthCheck"`
Cert *sslconfigs.SSLCertConfig `yaml:"cert" json:"cert"` // 请求源服务器用的证书 CertRef *sslconfigs.SSLCertRef `yaml:"certRef" json:"certRef"` // 证书的引用
Cert *sslconfigs.SSLCertConfig `yaml:"cert" json:"cert"` // 请求源服务器用的证书
// ftp // ftp
FTP *OriginFTPConfig `yaml:"ftp" json:"ftp"` FTPServerRef *FTPServerRef `yaml:"ftpServerRef" json:"ftpServerRef"`
FTPServer *FTPServerConfig `yaml:"ftpServer" json:"ftpServer"`
connTimeoutDuration time.Duration connTimeoutDuration time.Duration
readTimeoutDuration time.Duration readTimeoutDuration time.Duration