Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Templates = []Template{
{
Background: "#ffffff",
Color: "#8aaae5",
}, {
Background: "#fBf8Be",
Color: "#234e70",
}, {
Background: "#000000",
Color: "#f3ca20",
}, {
Background: "d9a5b3",
Color: "#1868ae",
}, {
Background: "fff1e1",
Color: "1d3c45",
}, {
Background: "#ced7d8",
Color: "#f47a60",
}, {
Background: "#ffffff",
Color: "#cc9999",
},
}
Functions ¶
This section is empty.
Types ¶
type Captcha ¶
type Captcha struct { Width int // Width of the generated image Height int // Height of the generated image FontWeight float64 // FontWeight of captcha word }
Captcha is an instantiation used for defining some information of the captcha image.
func (*Captcha) Alphabetical ¶
Alphabetical generates alphabetical captcha image with input length.
func (*Captcha) Mixed ¶
Mixed generates mixed (combination of alphabetical and numeric words) captcha image with input length.
type Template ¶
type Template struct { Background string // Background color of captcha image Color string // Color of the captcha word }
Template is an instantiation that used for defining some templates for captcha image.
func RandTemplate ¶
func RandTemplate() Template
RandTemplate generates a random template from the template array.
Click to show internal directories.
Click to hide internal directories.