Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Captcha ¶
type Captcha interface {
// HTML returns the HTML content to display and refresh captcha images.
HTML() template.HTML
// ValidText validates the passed text against the secret text.
ValidText(t string) bool
}
Captcha represents a captcha service and is used to validate text in captcha images.
type Options ¶
type Options struct {
// URLPrefix is the URL path prefix for serving captcha images. Default is
// "/.captcha/".
URLPrefix string
// TextLength is the length of text to be generated in captcha images. Default
// is 4.
TextLength int
// Width is the image width of captcha. Default is 240.
Width int
// Height is the image height of captcha. Default is 80.
Height int
// DPI is the image DPI of captcha. Default is 72.
DPI int
}
Options contains options for the captcha.Captchaer middleware.
Click to show internal directories.
Click to hide internal directories.