Documentation
¶
Overview ¶
Package captcha provides a simple API for captcha generation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct {
// Text is captcha solution
Text string
// contains filtered or unexported fields
}
Data is the result of captcha generation. It has a `Text` field and a private `img` field that will be used in `WriteTo` receiver
type Options ¶
type Options struct {
// BackgroundColor is captcha image's background color.
// It defaults to color.Transparent.
BackgroundColor color.Color
// CharPreset decides what text will be on captcha image.
// It defaults to digit 0-9 and all English alphabet.
// ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
CharPreset string
// TextLength is the length of captcha text.
// It defaults to 4.
TextLength int
// CurveNumber is the number of curves to draw on captcha image.
// It defaults to 2.
CurveNumber int
// contains filtered or unexported fields
}
Options manage captcha generation details.
Click to show internal directories.
Click to hide internal directories.
