initial commit

This commit is contained in:
matyushev_mo committed 2024-12-06 16:10:35 +03:00
commit e8da0f7874
15 files changed
+722

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
package config
import (
"log"
"os"
)
var (
DSN = getEnv("DSN")
SMTPHost = getEnv("SMTP_HOST")
SMTPEmail = getEnv("SMTP_EMAIL")
SMTPPassword = getEnv("SMTP_PASSWORD")
MockSMTPRecipient = getEnv("MOCK_SMTP_RECIPIENT")
JWTSecret = getEnv("JWT_SECRET")
)
func getEnv(k string) string {
v := os.Getenv(k)
if v == "" {
log.Fatalf("enviroment variable %s is required", k)
}
return v
}