mh_goadmin_server/tools/config/ssl.go

22 lines
343 B
Go
Raw Normal View History

2023-09-16 02:56:39 +00:00
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)