Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EmailUser string EmailPassword string EmailHost string EmailAddr string EmailSender string )
View Source
var CaptchaPath string = "./data/captcha"
Functions ¶
func InitConfig ¶
func InitConfig(emailUser, emailPassword, emailHost, emailAddr, emailSender string)
Types ¶
type GetCaptcha ¶
type GetCaptcha struct {
httputil.Handler
Request struct{}
Response struct {
Width int `json:"width"`
Height int `json:"height"`
ImageBase64 string `json:"image_base64"`
ThumbaBase64 string `json:"thumba_base64"`
CaptchaKey string `json:"key"`
}
}
func (GetCaptcha) Run ¶
func (c GetCaptcha) Run(ctx *gin.Context)
type GetEmailCode ¶
type GetEmailCode struct {
httputil.Handler
Request struct {
Email string `json:"email"`
}
Response struct {
EmailKey string `json:"emailKey"`
}
}
func (GetEmailCode) Run ¶
func (c GetEmailCode) Run(ctx *gin.Context)
type Mail ¶
func (*Mail) BuildMessage ¶
type VerifyCaptcha ¶
type VerifyCaptcha struct {
httputil.Handler
Request struct {
CaptchaKey string `json:"key" validate:"required"`
Dots string `json:"dots" validate:"required"`
}
Response struct{}
}
func (VerifyCaptcha) Run ¶
func (c VerifyCaptcha) Run(ctx *gin.Context)
type VerifyEmailCode ¶
type VerifyEmailCode struct {
httputil.Handler
Request struct {
EmailKey string `json:"emailKey"`
Code string `json:"code"`
}
}
func (VerifyEmailCode) CheckCode ¶
func (c VerifyEmailCode) CheckCode(key, code string) error
func (VerifyEmailCode) Run ¶
func (c VerifyEmailCode) Run(ctx *gin.Context)
Click to show internal directories.
Click to hide internal directories.