persona-community-5/services/persona-api/internal/port/email.go
jordan f5f3229364
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add components: service/persona-api, worker/media-worker, app-react/creator-ui
2026-02-24 07:40:04 +00:00

12 lines
447 B
Go

package port
import "context"
// EmailSender sends emails for authentication flows (OTP, magic link, password reset, etc.).
type EmailSender interface {
// SendAuthCode sends an authentication code to the given email.
// purpose identifies the flow (e.g. "login_otp", "magic_link", "password_reset", "email_verify").
// code is the token or OTP to include in the email.
SendAuthCode(ctx context.Context, email, code, purpose string) error
}