Documentation
¶
Index ¶
- Constants
- type EmailChangeHandler
- type EmailVerificationHandler
- type EmailVerificationOtpHandler
- type Handler
- type PasswordResetHandler
- type PayloadEmailChange
- type PayloadEmailChangeExtra
- type PayloadEmailVerification
- type PayloadEmailVerificationOtp
- type PayloadEmailVerificationOtpExtra
- type PayloadPasswordReset
- type PayloadPasswordResetExtra
Constants ¶
const ( JobTypeBackupLocal = "job_type_backup_local" ScopeDbBackup = "sqlite_backup" StrategyVacuum = "vacuum" StrategyOnline = "online" )
const JobTypeEmailChange = "job_type_email_change"
const JobTypeEmailVerification = "job_type_email_verification"
const JobTypeEmailVerificationOtp = "job_type_email_verification_otp"
const JobTypePasswordReset = "job_type_password_reset"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailChangeHandler ¶
type EmailChangeHandler struct {
// contains filtered or unexported fields
}
EmailChangeHandler handles email change requests
func NewEmailChangeHandler ¶
func NewEmailChangeHandler(dbAuth db.DbAuth, provider *config.Provider, mailer mail.MailerInterface) *EmailChangeHandler
NewEmailChangeHandler creates a new EmailChangeHandler
type EmailVerificationHandler ¶
type EmailVerificationHandler struct {
// contains filtered or unexported fields
}
EmailVerificationHandler handles email verification jobs
func NewEmailVerificationHandler ¶
func NewEmailVerificationHandler(dbAuth db.DbAuth, provider *config.Provider, mailer mail.MailerInterface) *EmailVerificationHandler
NewEmailVerificationHandler creates a new EmailVerificationHandler
type EmailVerificationOtpHandler ¶ added in v0.10.0
type EmailVerificationOtpHandler struct {
// contains filtered or unexported fields
}
EmailVerificationOtpHandler handles sending OTP emails
func NewEmailVerificationOtpHandler ¶ added in v0.10.0
func NewEmailVerificationOtpHandler(mailer mail.MailerInterface) *EmailVerificationOtpHandler
NewEmailVerificationOtpHandler creates a new handler
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles database backup jobs
func NewHandler ¶
NewHandler creates a new Handler
type PasswordResetHandler ¶
type PasswordResetHandler struct {
// contains filtered or unexported fields
}
PasswordResetHandler handles password reset requests
func NewPasswordResetHandler ¶
func NewPasswordResetHandler(dbAuth db.DbAuth, provider *config.Provider, mailer mail.MailerInterface) *PasswordResetHandler
NewPasswordResetHandler creates a new PasswordResetHandler
type PayloadEmailChange ¶
type PayloadEmailChangeExtra ¶
type PayloadEmailChangeExtra struct {
NewEmail string `json:"new_email"`
}
type PayloadEmailVerification ¶
type PayloadEmailVerification struct {
Email string `json:"email"`
// CooldownBucket is the time bucket number calculated from the current time divided by the cooldown duration.
// This provides a basic rate limiting mechanism where only one email verification request is allowed per time bucket.
// The bucket number is calculated as: floor(current Unix time / cooldown duration in seconds)
CooldownBucket int `json:"cooldown_bucket"`
}
PayloadEmailVerification contains the email verification details
type PayloadEmailVerificationOtp ¶ added in v0.10.0
type PayloadEmailVerificationOtp struct {
Email string `json:"email"`
// CooldownBucket prevents rapid duplicate requests
CooldownBucket int `json:"cooldown_bucket"`
}
PayloadEmailVerificationOtp contains the details for deduplicating queued email tasks
type PayloadEmailVerificationOtpExtra ¶ added in v0.10.0
type PayloadEmailVerificationOtpExtra struct {
Otp string `json:"otp"`
}
PayloadEmailVerificationOtpExtra contains the unique OTP code data to act upon
type PayloadPasswordReset ¶
type PayloadPasswordResetExtra ¶
type PayloadPasswordResetExtra struct {
Email string `json:"email"`
}