config.go (819B)
1 package backend 2 3 type Config struct { 4 Stripe StripeConfig `json:"stripe" binding:"required"` 5 SMTP SMTPConfig `json:"smtp" binding:"required"` 6 // Database connection string 7 Database string `json:"database"` 8 } 9 10 type StripeConfig struct { 11 // Stripe API key 12 Key string `json:"key" binding:"required"` 13 // Stripe webhook signing key 14 WebhookKey string `json:"webhook_key" binding:"required"` 15 } 16 17 type SMTPConfig struct { 18 // Server for mail submission 19 Server string `json:"server" binding:"required"` 20 // Port for mail submission 21 Port string `json:"port" binding:"required"` 22 // User to authenticate for 23 User string `json:"user" binding:"required"` 24 // Password to authenticate with 25 Password string `json:"password" binding:"required"` 26 // Name given in From: header 27 Name string `json:"name" binding:"required"` 28 }