providers

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

GetStatus gets the delivery status of a notification

func (*MailerSendProvider) ID

func (p *MailerSendProvider) ID() string

ID returns the provider ID

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

Send sends an email notification via MailerSend API

func (*MailerSendProvider) Type

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) ID

func (p *PostmarkProvider) ID() string

ID returns the provider ID

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

Send sends an email notification via Postmark API

func (*PostmarkProvider) Type

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) ID

func (p *ResendProvider) ID() string

ID returns the provider ID

func (*ResendProvider) Send

Send sends an email notification via Resend API

func (*ResendProvider) Type

Type returns the notification type this provider handles

func (*ResendProvider) ValidateConfig

func (p *ResendProvider) ValidateConfig() error

ValidateConfig validates the provider configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL