Documentation
¶
Index ¶
- type MailerSendConfig
- type MailerSendProvider
- func (p *MailerSendProvider) GetStatus(ctx context.Context, providerID string) (notification.NotificationStatus, error)
- func (p *MailerSendProvider) ID() string
- func (p *MailerSendProvider) MapWebhookEventToStatus(eventType string) notification.NotificationStatus
- func (p *MailerSendProvider) ParseWebhookEvent(body []byte) (*MailerSendWebhookEvent, error)
- func (p *MailerSendProvider) Send(ctx context.Context, notif *notification.Notification) error
- func (p *MailerSendProvider) Type() notification.NotificationType
- func (p *MailerSendProvider) ValidateConfig() error
- type MailerSendWebhookEvent
- type PostmarkConfig
- type PostmarkProvider
- func (p *PostmarkProvider) GetStatus(ctx context.Context, providerID string) (notification.NotificationStatus, error)
- func (p *PostmarkProvider) ID() string
- func (p *PostmarkProvider) MapWebhookEventToStatus(recordType string) notification.NotificationStatus
- func (p *PostmarkProvider) ParseWebhookEvent(body []byte) (*PostmarkWebhookEvent, error)
- func (p *PostmarkProvider) Send(ctx context.Context, notif *notification.Notification) error
- func (p *PostmarkProvider) Type() notification.NotificationType
- func (p *PostmarkProvider) ValidateConfig() error
- type PostmarkWebhookEvent
- type ResendConfig
- type ResendProvider
- func (p *ResendProvider) GetStatus(ctx context.Context, providerID string) (notification.NotificationStatus, error)
- func (p *ResendProvider) ID() string
- func (p *ResendProvider) Send(ctx context.Context, notif *notification.Notification) error
- func (p *ResendProvider) Type() notification.NotificationType
- func (p *ResendProvider) ValidateConfig() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailerSendConfig ¶
type MailerSendConfig struct {
APIKey string `json:"api_key"`
From string `json:"from"`
FromName string `json:"from_name"`
ReplyTo string `json:"reply_to,omitempty"`
}
MailerSendConfig holds MailerSend API configuration
type MailerSendProvider ¶
type MailerSendProvider struct {
// contains filtered or unexported fields
}
MailerSendProvider implements notification.Provider for MailerSend email service
func NewMailerSendProvider ¶
func NewMailerSendProvider(config MailerSendConfig) *MailerSendProvider
NewMailerSendProvider creates a new MailerSend email provider
func (*MailerSendProvider) GetStatus ¶
func (p *MailerSendProvider) GetStatus(ctx context.Context, providerID string) (notification.NotificationStatus, error)
GetStatus gets the delivery status of a notification
func (*MailerSendProvider) MapWebhookEventToStatus ¶
func (p *MailerSendProvider) MapWebhookEventToStatus(eventType string) notification.NotificationStatus
MapWebhookEventToStatus maps a MailerSend webhook event type to notification status
func (*MailerSendProvider) ParseWebhookEvent ¶
func (p *MailerSendProvider) ParseWebhookEvent(body []byte) (*MailerSendWebhookEvent, error)
ParseWebhookEvent parses a MailerSend webhook event
func (*MailerSendProvider) Send ¶
func (p *MailerSendProvider) Send(ctx context.Context, notif *notification.Notification) error
Send sends an email notification via MailerSend API
func (*MailerSendProvider) Type ¶
func (p *MailerSendProvider) Type() notification.NotificationType
Type returns the notification type this provider handles
func (*MailerSendProvider) ValidateConfig ¶
func (p *MailerSendProvider) ValidateConfig() error
ValidateConfig validates the provider configuration
type MailerSendWebhookEvent ¶
type MailerSendWebhookEvent struct {
Type string `json:"type"`
Email string `json:"email"`
MessageID string `json:"message_id"`
Timestamp int64 `json:"timestamp"`
Data map[string]interface{} `json:"data"`
}
MailerSendWebhookEvent represents a MailerSend webhook event
type PostmarkConfig ¶
type PostmarkConfig struct {
ServerToken string `json:"server_token"`
From string `json:"from"`
FromName string `json:"from_name"`
ReplyTo string `json:"reply_to,omitempty"`
TrackOpens bool `json:"track_opens"`
TrackLinks string `json:"track_links"` // None, HtmlAndText, HtmlOnly, TextOnly
}
PostmarkConfig holds Postmark API configuration
type PostmarkProvider ¶
type PostmarkProvider struct {
// contains filtered or unexported fields
}
PostmarkProvider implements notification.Provider for Postmark email service
func NewPostmarkProvider ¶
func NewPostmarkProvider(config PostmarkConfig) *PostmarkProvider
NewPostmarkProvider creates a new Postmark email provider
func (*PostmarkProvider) GetStatus ¶
func (p *PostmarkProvider) GetStatus(ctx context.Context, providerID string) (notification.NotificationStatus, error)
GetStatus gets the delivery status of a notification
func (*PostmarkProvider) MapWebhookEventToStatus ¶
func (p *PostmarkProvider) MapWebhookEventToStatus(recordType string) notification.NotificationStatus
MapWebhookEventToStatus maps a Postmark webhook event type to notification status
func (*PostmarkProvider) ParseWebhookEvent ¶
func (p *PostmarkProvider) ParseWebhookEvent(body []byte) (*PostmarkWebhookEvent, error)
ParseWebhookEvent parses a Postmark webhook event
func (*PostmarkProvider) Send ¶
func (p *PostmarkProvider) Send(ctx context.Context, notif *notification.Notification) error
Send sends an email notification via Postmark API
func (*PostmarkProvider) Type ¶
func (p *PostmarkProvider) Type() notification.NotificationType
Type returns the notification type this provider handles
func (*PostmarkProvider) ValidateConfig ¶
func (p *PostmarkProvider) ValidateConfig() error
ValidateConfig validates the provider configuration
type PostmarkWebhookEvent ¶
type PostmarkWebhookEvent struct {
RecordType string `json:"RecordType"`
MessageID string `json:"MessageID"`
Recipient string `json:"Recipient"`
Tag string `json:"Tag"`
DeliveredAt string `json:"DeliveredAt"`
Details map[string]interface{} `json:"Details"`
}
PostmarkWebhookEvent represents a Postmark webhook event
type ResendConfig ¶
type ResendConfig struct {
APIKey string `json:"api_key"`
From string `json:"from"`
FromName string `json:"from_name"`
ReplyTo string `json:"reply_to,omitempty"`
}
ResendConfig holds Resend API configuration
type ResendProvider ¶
type ResendProvider struct {
// contains filtered or unexported fields
}
ResendProvider implements notification.Provider for Resend email service
func NewResendProvider ¶
func NewResendProvider(config ResendConfig) *ResendProvider
NewResendProvider creates a new Resend email provider
func (*ResendProvider) GetStatus ¶
func (p *ResendProvider) GetStatus(ctx context.Context, providerID string) (notification.NotificationStatus, error)
GetStatus gets the delivery status of a notification
func (*ResendProvider) Send ¶
func (p *ResendProvider) Send(ctx context.Context, notif *notification.Notification) error
Send sends an email notification via Resend API
func (*ResendProvider) Type ¶
func (p *ResendProvider) Type() notification.NotificationType
Type returns the notification type this provider handles
func (*ResendProvider) ValidateConfig ¶
func (p *ResendProvider) ValidateConfig() error
ValidateConfig validates the provider configuration