otp

package
v0.0.0-...-d22e7c3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Usecase

type Usecase struct {
	// contains filtered or unexported fields
}

Usecase of otp

func New

func New(otpRepo otpRepo) (*Usecase, error)

New otp usecase

func (Usecase) Create

func (u Usecase) Create(ctx context.Context, uniqueID string, codeLength otpentity.CodeLength, expire time.Duration) (*otpentity.OTP, error)

Create OTP

func (Usecase) Delete

func (u Usecase) Delete(ctx context.Context, uniqueID string) error

Delete OTP

func (Usecase) Validate

func (u Usecase) Validate(ctx context.Context, uniqueID string, otpCode string) error

Validate the otpcode

Jump to

Keyboard shortcuts

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