email

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Email string `json:"email"`
	Code  string `json:"code,omitempty"`
}

func (*Data) IsValidEmailMask

func (d *Data) IsValidEmailMask() bool

type Email

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

func NewEmailProvider

func NewEmailProvider(provider *secure.Provider, service Service, ttl, len int) *Email

func (*Email) GetName

func (p *Email) GetName() string

func (*Email) GetRouter

func (p *Email) GetRouter(r chi.Router)

type HTMLEmailService

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

func NewHTMLEmailService

func NewHTMLEmailService(smtp *tools.SMTP, emailGenerator func(email string, code string) (name string, subject string, message []byte)) *HTMLEmailService

func (*HTMLEmailService) SendVerificationCode

func (es *HTMLEmailService) SendVerificationCode(email string, code string) error

type PlainEmailService

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

func NewPlainEmailService

func NewPlainEmailService(smtp *tools.SMTP, emailGenerator func(email string, code string) (name string, subject string, message string)) *PlainEmailService

func (*PlainEmailService) SendVerificationCode

func (es *PlainEmailService) SendVerificationCode(email string, code string) error

type Service

type Service interface {
	SendVerificationCode(phone string, code string) error
}

Jump to

Keyboard shortcuts

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