template-monorepo/internal/model/notification/README.md

1.1 KiB
Raw Blame History

ji3

擴充指南

新增 Email Provider

已內建:smtp_sender.goses_sender.go。若要再加其他 ESP

  1. provider/email/ 實作 SenderNameSortSend)。
  2. config/config.go 加設定區塊,並在 collectEmailSenders 註冊。
  3. provider/email/*_test.go

新增 NotifyKind

  1. domain/enum/kind.go 常數。
  2. embed 模板 + template/registry.go
  3. 若為 OTP 類,業務呼叫時設 DoNotPersistBody: true

新增 HTTP API

  1. generate/api/ 定義路由。
  2. make gen-api
  3. internal/logic 只呼叫 domain/usecase 介面,做 types ↔ DTO 映射。

相關文件