mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-10 01:10:27 +08:00
29 lines
565 B
Go
29 lines
565 B
Go
package serverconfigs
|
|
|
|
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/sslconfigs"
|
|
|
|
// HTTPS协议配置
|
|
type HTTPSProtocolConfig struct {
|
|
BaseProtocol `yaml:",inline"`
|
|
|
|
SSLPolicyRef *sslconfigs.SSLRef `yaml:"sslPolicyRef" json:"sslPolicyRef"`
|
|
SSLPolicy *sslconfigs.SSLPolicy `yaml:"sslPolicy" json:"sslPolicy"`
|
|
}
|
|
|
|
// 初始化
|
|
func (this *HTTPSProtocolConfig) Init() error {
|
|
err := this.InitBase()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
if this.SSLPolicy != nil {
|
|
err := this.SSLPolicy.Init()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|