s1llyw0rdz/config/cfg.go
2021-12-10 18:48:24 +01:00

29 lines
570 B
Go

package config
import "os"
type (
Config struct {
DatabaseURL string
SessionKey string
Env string
CertFile string
KeyFile string
AssetsDir string
EmailUsername string
EmailPassword string
EmailHost string
EmailHostAddr string
}
)
func New() *Config {
return &Config{
DatabaseURL: os.Getenv("DATABASE_URL"),
SessionKey: os.Getenv("SESSION_KEY"),
Env: os.Getenv("ENV"),
CertFile: os.Getenv("CERT_FILE"),
KeyFile: os.Getenv("CERT_KEY_FILE"),
AssetsDir: os.Getenv("ASSETS_DIR"),
}
}