Documentation ¶
Index ¶
- func NewCaptchaStore(cache cache.CacheStore, expiration time.Duration) base64Captcha.Store
- type Captcha
- func (c *Captcha) GenerateAudioCaptcha(length int) (id, b64s, answer string, err error)
- func (c *Captcha) GenerateCaptcha(cfg CaptchaConfig) (id, b64s, answer string, err error)
- func (c *Captcha) GenerateChinseCaptcha(length int) (id, b64s, answer string, err error)
- func (c *Captcha) GenerateDigitCaptcha(length int) (id, b64s, answer string, err error)
- func (c *Captcha) GenerateMathCaptcha(length int) (id, b64s, answer string, err error)
- func (c *Captcha) GenerateStringCaptcha(length int) (id, b64s, answer string, err error)
- func (c *Captcha) Verify(id, code string, clear bool) bool
- type CaptchaConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCaptchaStore ¶
func NewCaptchaStore(cache cache.CacheStore, expiration time.Duration) base64Captcha.Store
Types ¶
type Captcha ¶
type Captcha struct {
// contains filtered or unexported fields
}
func NewCaptcha ¶
func NewCaptcha(store base64Captcha.Store) *Captcha
func (*Captcha) GenerateAudioCaptcha ¶
func (*Captcha) GenerateCaptcha ¶
func (c *Captcha) GenerateCaptcha(cfg CaptchaConfig) (id, b64s, answer string, err error)
func (*Captcha) GenerateChinseCaptcha ¶
func (*Captcha) GenerateDigitCaptcha ¶
func (*Captcha) GenerateMathCaptcha ¶
func (*Captcha) GenerateStringCaptcha ¶
type CaptchaConfig ¶
Click to show internal directories.
Click to hide internal directories.