s1llyw0rdz/config/cfg.go

26 lines
466 B
Go
Raw Normal View History

2021-11-22 08:05:57 +00:00
package config
import "os"
type (
Config struct {
2021-11-22 09:06:23 +00:00
DatabaseURL string
SessionKey string
Env string
CertFile string
KeyFile string
2021-11-22 20:23:30 +00:00
AssetsDir string
2021-11-22 08:05:57 +00:00
}
)
func New() *Config {
return &Config{
2021-11-22 09:06:23 +00:00
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"),
2021-11-22 20:23:30 +00:00
AssetsDir: os.Getenv("ASSETS_DIR"),
2021-11-22 08:05:57 +00:00
}
}