refactor(mail): modernize smtp sending with go-mail and unify message gateway pusher

This commit is contained in:
ryan
2026-09-02 21:59:47 +08:00
parent 88ed98b013
commit cf0cba0679
11 changed files with 298 additions and 342 deletions
+3
View File
@@ -6,6 +6,7 @@ package contracts
import "context"
// PushNotificationTemplate defines notification message template payload.
type PushNotificationTemplate struct {
Title string
Content string
@@ -13,6 +14,7 @@ type PushNotificationTemplate struct {
Ext map[string]any
}
// PushEventMeta defines metadata for a system push event.
type PushEventMeta struct {
Key string
Name string
@@ -20,6 +22,7 @@ type PushEventMeta struct {
DefaultTemplate PushNotificationTemplate
}
// PushRegistry defines the interface for registering built-in events.
type PushRegistry interface {
RegisterBuiltInEvent(meta PushEventMeta)
SyncEvents(ctx context.Context) error