Files
narratio/internal/adapters/notify/sender.go

23 lines
538 B
Go

// Package notify declares the adapter contract for run notifications.
package notify
import "context"
// Sender is the adapter boundary for notifications.
type Sender interface {
Send(ctx context.Context, req SendRequest) (SendResult, error)
}
// 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
}