otp

package
v0.0.0-...-4605876 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UseCasesOTP

type UseCasesOTP interface {
	GenerateAndSendOTP(ctx context.Context, phoneNumber string, flavour enums.Flavour) (string, error)
}

UseCasesOTP contain all the method required for OTP delivery

func NewUseCaseOTP

func NewUseCaseOTP(
	create datastore.Create,
	query datastore.Query,
) UseCasesOTP

NewUseCaseOTP initializes the new otp implementation

type UseCasesOTPImpl

type UseCasesOTPImpl struct {
	Create datastore.Create
	Query  datastore.Query
	Ext    extension.Extension
}

UseCasesOTPImpl represents the user otp usecase implementation

func (*UseCasesOTPImpl) GenerateAndSendOTP

func (o *UseCasesOTPImpl) GenerateAndSendOTP(ctx context.Context, phoneNumber string, flavour enums.Flavour) (string, error)

GenerateAndSendOTP generates and sends an OTP to the user

Jump to

Keyboard shortcuts

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