mark

package
v0.0.0-...-b89eba7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSendTooMany = errors.New("发送过于频繁")

Functions

This section is empty.

Types

type Config

type Config struct {
	UserMarkDuration time.Duration  // 用户标记时长
	CodeMarkDuration time.Duration  // 验证码标记时长
	SMTPInfo         email.SMTPInfo // 邮箱配置
	AppName          string         // 应用名称
}

type Mark

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

func New

func New(conf Config) *Mark

func (*Mark) CheckCode

func (m *Mark) CheckCode(emailStr, code string) bool

CheckCode 校验验证码 nolint

func (*Mark) CheckUserExist

func (m *Mark) CheckUserExist(email string) bool

CheckUserExist 判断邮箱是否已经被记录

func (*Mark) SendMail

func (m *Mark) SendMail(emailStr, code string) error

SendMail 发送验证码 nolint

Jump to

Keyboard shortcuts

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