Versions in this module Expand all Collapse all v1 v1.0.1 Jul 17, 2019 v1.0.0 Jul 10, 2019 Changes in this version + const HeaderCaptchaEnabled + const HeaderCaptchaName + const HeaderReset + func Factories() []string + func Register(name string, f Factory) + func UnregisterAll() + type Captcha struct + AddrWhiteList []string + DisabledScenes map[string]bool + Enabled bool + EnabledChecker func(captcha *Captcha, scene string, r *http.Request) (bool, error) + SessionStore *session.Store + func New(s *session.Store) *Captcha + func (c *Captcha) CaptchaAction(scene string) func(w http.ResponseWriter, r *http.Request) + func (c *Captcha) EnabledCheck(scene string, r *http.Request) (bool, error) + func (c *Captcha) Verifier(r *http.Request, scene string) Verifier + func (c *Captcha) Verify(r *http.Request, scene string, token string) (bool, error) + type Config struct + AddrWhiteList []string + Config cache.ConfigMap + DisabledScenes map[string]bool + Driver string + Enabled bool + func (c *Config) ApplyTo(captcha *Captcha) error + type Driver interface + MustCaptcha func(s *session.Store, w http.ResponseWriter, r *http.Request, scene string, ...) + Name func() string + Verify func(s *session.Store, r *http.Request, scene string, token string) (bool, error) + func NewDriver(name string, conf cache.Config, prefix string) (Driver, error) + type Factory func(conf cache.Config, prefix string) (Driver, error) + type Verifier func(token string) (bool, error)