Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterConfig ¶
type AdapterConfig struct { Notify NotifyChannel `mapstructure:"notify"` Email EmailProvider `mapstructure:"email"` SMS SMSProvider `mapstructure:"sms"` }
AdapterConfig holds configuration for different notification adapters.
type AppConfig ¶
type AppConfig struct {
Name string `mapstructure:"name"`
}
AppConfig stores application-specific configuration.
type BrevoConfig ¶
type BrevoConfig struct { APIKey string `mapstructure:"apiKey"` SenderEmail string `mapstructure:"senderEmail"` SenderName string `mapstructure:"senderName"` SMSSender string `mapstructure:"smsSender"` }
BrevoConfig holds Brevo (formerly Sendinblue) specific configuration.
type Config ¶
type Config struct { Log LogConfig `mapstructure:"log"` Adapter AdapterConfig `mapstructure:"adapter"` SendGrid SendGridConfig `mapstructure:"sendgrid"` Twilio TwilioConfig `mapstructure:"twilio"` Telegram TelegramConfig `mapstructure:"telegram"` Brevo BrevoConfig `mapstructure:"brevo"` }
Config stores all configuration of the application.
func LoadConfig ¶
LoadConfig reads configuration from a YAML file or environment variables.
type EmailProvider ¶
type EmailProvider string
const ( EmailSendGrid EmailProvider = "sendgrid" EmailBrevo EmailProvider = "brevo" EmailMock EmailProvider = "mock" )
type NotifyChannel ¶
type NotifyChannel string
const ( NotifyMock NotifyChannel = "mock" NotifyTelegram NotifyChannel = "telegram" NotifySlack NotifyChannel = "slack" )
type SMSProvider ¶
type SMSProvider string
const ( SMSProviderTwilio SMSProvider = "twilio" SMSProviderBrevo SMSProvider = "brevo" SMSProviderMock SMSProvider = "mock" )
type SendGridConfig ¶
type SendGridConfig struct { APIKey string `mapstructure:"apiKey"` FromEmail string `mapstructure:"fromEmail"` FromName string `mapstructure:"fromName"` }
SendGridConfig holds SendGrid specific configuration.
type TelegramConfig ¶
type TelegramConfig struct { BotToken string `mapstructure:"botToken"` ChatID string `mapstructure:"chatId"` Debug bool `mapstructure:"debug"` }
TelegramConfig holds Telegram specific configuration.
Click to show internal directories.
Click to hide internal directories.