Documentation ¶
Index ¶
- Constants
- func GenerateCaptchaID(len int) string
- func InitTemplateMiddleware(manage TemplateManage)
- func ServerCaptcha(c *kelly.Context, width, height int)
- func TemplateMiddleware(path string) kelly.HandlerFunc
- func VerifyCaptcha(captchaID, captchaCode string) bool
- type Qrcode
- type Template
- type TemplateManage
Constants ¶
View Source
const ( QrcodeLow = int(qrcode.Low) QrcodeMedium = int(qrcode.Medium) QrcodeHigh = int(qrcode.High) QrcodeHighest = int(qrcode.Highest) )
Variables ¶
This section is empty.
Functions ¶
func InitTemplateMiddleware ¶
func InitTemplateMiddleware(manage TemplateManage)
func ServerCaptcha ¶
request的url必须是 http(s)://host/path/{CaptchaID}.png
func TemplateMiddleware ¶
func TemplateMiddleware(path string) kelly.HandlerFunc
通过中间件预编译模板,并设置到context
Types ¶
type Template ¶
Click to show internal directories.
Click to hide internal directories.