utils

package
v0.0.0-...-5d42812 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BcryptMake

func BcryptMake(pwd []byte) string

func BcryptMakeCheck

func BcryptMakeCheck(pwd []byte, hashedPwd string) bool

func MD5

func MD5(str []byte, b ...byte) string

func PathExists

func PathExists(path string) (bool, error)

func RandString

func RandString(len int) string

func ValidateMobile

func ValidateMobile(fl validator.FieldLevel) bool

ValidateMobile 校验手机号

Types

type Client

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

Client simple email client support ssl

func NewEmailClient

func NewEmailClient(user, password, nickName, host, port string, isSsl bool) *Client

NewEmailClient New email client

func (*Client) SendEmail

func (ec *Client) SendEmail(toUser []string, subject string, content string) error

SendEmail send email by string content

func (*Client) SendEmailByte

func (ec *Client) SendEmailByte(toUser []string, subject string, body []byte) error

SendEmailByte send email by byte body

Jump to

Keyboard shortcuts

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