Documentation
¶
Index ¶
- Constants
- type DummyHandler
- type EmailChangeAlertHandler
- type EmailChangeOtpHandler
- type EmailVerificationOtpHandler
- type Handler
- type PasswordResetOtpHandler
- type PayloadDummy
- type PayloadEmailChangeAlert
- type PayloadEmailChangeOtp
- type PayloadEmailChangeOtpExtra
- type PayloadEmailVerificationOtp
- type PayloadEmailVerificationOtpExtra
- type PayloadPasswordResetOtp
- type PayloadPasswordResetOtpExtra
Constants ¶
const ( JobTypeBackupLocal = "job_type_backup_local" ScopeDbBackup = "sqlite_backup" StrategyVacuum = "vacuum" StrategyOnline = "online" )
const JobTypeDummy = "job_type_dummy"
const JobTypeEmailChangeAlert = "job_type_email_change_alert"
const JobTypeEmailChangeOtp = "job_type_email_change_otp"
const JobTypeEmailVerificationOtp = "job_type_email_verification_otp"
const JobTypePasswordResetOtp = "job_type_password_reset_otp"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyHandler ¶ added in v0.11.0
type DummyHandler struct{}
DummyHandler intentionally does nothing. It exists solely to successfully complete JobTypeDummy jobs that are inserted by auth endpoints to defeat timing attacks. By returning nil, the job is safely marked completed and purged.
func NewDummyHandler ¶ added in v0.11.0
func NewDummyHandler() *DummyHandler
type EmailChangeAlertHandler ¶ added in v0.11.0
type EmailChangeAlertHandler struct {
// contains filtered or unexported fields
}
func NewEmailChangeAlertHandler ¶ added in v0.11.0
func NewEmailChangeAlertHandler(mailer mail.MailerInterface) *EmailChangeAlertHandler
type EmailChangeOtpHandler ¶ added in v0.11.0
type EmailChangeOtpHandler struct {
// contains filtered or unexported fields
}
func NewEmailChangeOtpHandler ¶ added in v0.11.0
func NewEmailChangeOtpHandler(mailer mail.MailerInterface) *EmailChangeOtpHandler
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 PasswordResetOtpHandler ¶ added in v0.11.0
type PasswordResetOtpHandler struct {
// contains filtered or unexported fields
}
func NewPasswordResetOtpHandler ¶ added in v0.11.0
func NewPasswordResetOtpHandler(mailer mail.MailerInterface) *PasswordResetOtpHandler
type PayloadDummy ¶ added in v0.11.0
type PayloadDummy struct {
DummyID string `json:"dummy_id"`
}
PayloadDummy is used for timing equalization jobs. It contains a random ID to ensure that dummy jobs never hit unique constraints intended for real jobs.
type PayloadEmailChangeAlert ¶ added in v0.11.0
type PayloadEmailChangeOtp ¶ added in v0.11.0
type PayloadEmailChangeOtpExtra ¶ added in v0.11.0
type PayloadEmailChangeOtpExtra struct {
Otp string `json:"otp"`
}
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 PayloadPasswordResetOtp ¶ added in v0.11.0
type PayloadPasswordResetOtpExtra ¶ added in v0.11.0
type PayloadPasswordResetOtpExtra struct {
Otp string `json:"otp"`
}