Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(opt ...CaptchaOpt) (reqId, captcha, b64s string)
func GenerateText ¶
func GenerateText(opt ...CaptchaOpt) (reqId, captcha string)
func Verify ¶
func Verify(reqId, captcha string, opt ...CaptchaOpt) (ret bool)
Types ¶
type CaptchaOpt ¶
type CaptchaOpt struct { Length int // 验证码长度 Password string // 验证码密码 Timeout int64 // 验证码超时时间 TimeoutPeriodSteps int64 // 验证码超时时间周期分步 // Height png height in pixel. Height int // Width Captcha png width in pixel. Width int //NoiseCount text noise count. NoiseCount int //ShowLineOptions := OptionShowHollowLine | OptionShowSlimeLine | OptionShowSineLine . ShowLineOptions int //BgColor captcha image background color (optional) BgColor *color.RGBA }
func GetCaptchaOpt ¶
func GetCaptchaOpt(opt ...CaptchaOpt) (optRet CaptchaOpt)
Click to show internal directories.
Click to hide internal directories.