Documentation
¶
Index ¶
Constants ¶
View Source
const CaptchaSessionKey = "captcha_data"
验证码 Session Key
Variables ¶
View Source
var Store = sessions.NewCookieStore([]byte(config.CfgSession.SessionSecret))
Session 存储配置
Functions ¶
func GenerateCaptchaImage ¶
Types ¶
type CaptchaProblem ¶
type CaptchaProblem struct {
Question string `json:"question"`
Answer int `json:"answer"`
Type CaptchaType `json:"type"`
}
验证码问题
func GenerateMathProblem ¶
func GenerateMathProblem() CaptchaProblem
type CaptchaReponse ¶
type CaptchaType ¶
type CaptchaType int
验证码类型
const ( Addition CaptchaType = iota // 加法 Subtraction // 减法 Multiplication // 乘法 Division // 除法 )
Click to show internal directories.
Click to hide internal directories.