Define adapter interfaces and fake implementations

This commit is contained in:
2026-05-02 11:16:27 -05:00
parent 78e7e4f41b
commit 2854da48c2
24 changed files with 876 additions and 73 deletions

View File

@@ -3,13 +3,20 @@ package notify
import "context"
// Sender is a placeholder adapter interface for notifications.
// Sender is the adapter boundary for notifications.
type Sender interface {
Send(ctx context.Context, msg Message) error
Send(ctx context.Context, req SendRequest) (SendResult, error)
}
// Message is a placeholder notification payload.
type Message struct {
Subject string
Body string
// SendRequest describes one notification request.
type SendRequest struct {
Subject string
Body string
Metadata map[string]string
}
// SendResult describes notification send outcome metadata.
type SendResult struct {
ProviderMessageID string
Metadata map[string]any
}