verification_repository

package
v0.1.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeVerificationEmail = "verification_email"
	TypeVerificationText  = "verification_text"
	TypeResetPassword     = "reset_password"
	TypeMagicLink         = "magic_link"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type VerificationRepository

type VerificationRepository interface {
	Create(ctx context.Context, verificationCode *models.VerificationCode) (*models.VerificationCode, error)
	Get(ctx context.Context, userId string, verificationType models.VerificationType) (*models.VerificationCode, error)
	IncreaseAttempts(ctx context.Context, userId string, verificationType models.VerificationType) error
	Delete(ctx context.Context, userId string, verificationType models.VerificationType) error
	BuildIndexes(ctx context.Context) error
}

func New

func New(collection *mongo.Collection) VerificationRepository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL