erp_server/tools/config/ssl.go
2023-09-16 11:11:36 +08:00

22 lines
343 B
Go

package config
import "github.com/spf13/viper"
type Ssl struct {
KeyStr string
Pem string
Enable bool
Domain string
}
func InitSsl(cfg *viper.Viper) *Ssl {
return &Ssl{
KeyStr: cfg.GetString("key"),
Pem: cfg.GetString("pem"),
Enable: cfg.GetBool("enable"),
Domain: cfg.GetString("domain"),
}
}
var SslConfig = new(Ssl)