util

package
v0.0.0-...-726a85d Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmailTemplate string

EmailTemplate 全局变量,用于存储邮件模板的内容

Functions

func BuildEmailContent

func BuildEmailContent(text string) string

func SendEmail

func SendEmail(to []string, org, subject, text string, cc []string, bcc []string)

SendEmail cc为抄送人,bcc为暗抄,org为组织名(自定义)

func VerifyCaptcha

func VerifyCaptcha(id string, value string) bool

校验图片验证码,并清除内存空间

Types

type CaptchaResult

type CaptchaResult struct {
	Id          string `json:"ID"`
	Image       string `json:"Image"`
	VerifyValue string `json:"Answer"`
}

func GenerateCaptcha

func GenerateCaptcha() (CaptchaResult, error)

GenerateCaptcha 生成图片验证码

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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