feat: add otp model + implementation for sql

This commit is contained in:
Lakhan Samani
2022-07-23 15:55:06 +05:30
parent 9ef5f33f7a
commit f6c67243b9
9 changed files with 230 additions and 1 deletions

View File

@@ -72,4 +72,13 @@ type Provider interface {
GetEmailTemplateByEventName(ctx context.Context, eventName string) (*model.EmailTemplate, error)
// DeleteEmailTemplate to delete EmailTemplate
DeleteEmailTemplate(ctx context.Context, emailTemplate *model.EmailTemplate) error
// AddOTP to add otp
AddOTP(ctx context.Context, otp *models.OTP) (*models.OTP, error)
// UpdateOTP to update otp for a given email address
UpdateOTP(ctx context.Context, otp *models.OTP) (*models.OTP, error)
// GetOTPByEmail to get otp for a given email address
GetOTPByEmail(ctx context.Context, emailAddress string) (*models.OTP, error)
// DeleteOTP to delete otp
DeleteOTP(ctx context.Context, otp *models.OTP) error
}