verification

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCode

func GenerateCode() (string, error)

GenerateCode is used to generate a code for email verification

Types

type CodeStore

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

CodeStore is used to generate, store and verify verification code

func (CodeStore) CleanUp

func (codeStore CodeStore) CleanUp()

CleanUp is used to remove expired verification codes

func (CodeStore) Disconnect

func (codeStore CodeStore) Disconnect()

Disconnect is used to disconnect from the mongodb

func (*CodeStore) Init

func (codeStore *CodeStore) Init() error

Init is used to initialize codeStore struct

func (CodeStore) NewCode

func (codeStore CodeStore) NewCode(ID string) (string, error)

NewCode is used to generate new and store a verification code

func (CodeStore) VerifyCode

func (codeStore CodeStore) VerifyCode(codeStr string) (string, error)

VerifyCode is used to verify a code and get the id tied to it

Jump to

Keyboard shortcuts

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