Integrate Notification Service into Tender Management System
- Added a new notification service to handle various notification types (email, SMS, push, OTP). - Implemented configuration for the notification service, allowing customization via environment variables. - Updated user and customer services to utilize the notification service for sending welcome emails and status updates. - Introduced a builder pattern for constructing notification requests, enhancing usability and flexibility. - Enhanced error handling and logging for notification operations, ensuring robust service integration. - Updated documentation to include usage examples and configuration details for the new notification SDK.
This commit is contained in:
@@ -65,6 +65,15 @@ type RateLimitConfig struct {
|
||||
Burst int `env:"RATE_LIMIT_BURST"`
|
||||
}
|
||||
|
||||
type NotificationConfig struct {
|
||||
BaseURL string `env:"NOTIFICATION_BASE_URL"`
|
||||
Timeout time.Duration `env:"NOTIFICATION_TIMEOUT"`
|
||||
RetryAttempts int `env:"NOTIFICATION_RETRY_ATTEMPTS"`
|
||||
RetryDelay time.Duration `env:"NOTIFICATION_RETRY_DELAY"`
|
||||
EnableLogging bool `env:"NOTIFICATION_ENABLE_LOGGING"`
|
||||
UserAgent string `env:"NOTIFICATION_USER_AGENT"`
|
||||
}
|
||||
|
||||
// LoadConfig loads configuration with priority: OS environment variables > .env file
|
||||
// OS environment variables take precedence over .env file values
|
||||
func LoadConfig[T any](path string, config T) (T, error) {
|
||||
|
||||
Reference in New Issue
Block a user