code

package
v0.0.0-...-0046f9d Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

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

Code handles creation of code and sending it to email

func New

func New(log *zap.Logger) *Code

New returns new Code.

func (Code) CreateAndSend

func (c Code) CreateAndSend(ctx context.Context, id, email string) (string, error)

CreateAndSend creates a code and sends it to the email

func (*Code) Disconnect

func (c *Code) Disconnect()

Disconnect disconnects client

func (Code) Verify

func (c Code) Verify(ctx context.Context, token string) (bool, string, error)

Verify verifies code and returns email

Jump to

Keyboard shortcuts

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