Documentation ¶
Index ¶
Constants ¶
View Source
const GEETEST_API string = "http://gcaptcha4.geetest.com"
View Source
const HCAPTCHA_API = "https://api.hcaptcha.com/siteverify"
View Source
const RECAPTCHA_API = "https://www.google.com/recaptcha/api/siteverify"
View Source
const TURNSTILE_API = "https://challenges.cloudflare.com/turnstile/v0/siteverify"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Checker ¶
type Checker interface { Type() CaptchaType Check(value string) (bool, error) Get() ([]byte, error) }
func NewCaptchaChecker ¶
func NewCaptchaChecker(conf *CheckerConf) Checker
type CheckerConf ¶
type CheckerConf struct { config.CaptchaConf User User }
type GeetestCaptchaChecker ¶
func NewGeetestChecker ¶
func NewGeetestChecker(conf *config.GeetestConf, user *User) *GeetestCaptchaChecker
func (*GeetestCaptchaChecker) Check ¶
func (c *GeetestCaptchaChecker) Check(value string) (bool, error)
func (*GeetestCaptchaChecker) Get ¶
func (c *GeetestCaptchaChecker) Get() ([]byte, error)
func (*GeetestCaptchaChecker) Type ¶
func (c *GeetestCaptchaChecker) Type() CaptchaType
type GeetestParams ¶
type HCaptchaChecker ¶
func NewHCaptchaChecker ¶
func NewHCaptchaChecker(conf *config.HCaptchaConf, user *User) *HCaptchaChecker
func (*HCaptchaChecker) Get ¶
func (c *HCaptchaChecker) Get() ([]byte, error)
func (*HCaptchaChecker) Type ¶
func (c *HCaptchaChecker) Type() CaptchaType
type ImageChecker ¶
type ImageChecker struct {
User *User
}
func NewImageChecker ¶
func NewImageChecker(user *User) *ImageChecker
func (*ImageChecker) Get ¶
func (c *ImageChecker) Get() ([]byte, error)
func (*ImageChecker) Type ¶
func (c *ImageChecker) Type() CaptchaType
type ReCaptchaChecker ¶
func NewReCaptchaChecker ¶
func NewReCaptchaChecker(conf *config.ReCaptchaConf, user *User) *ReCaptchaChecker
func (*ReCaptchaChecker) Get ¶
func (c *ReCaptchaChecker) Get() ([]byte, error)
func (*ReCaptchaChecker) Type ¶
func (c *ReCaptchaChecker) Type() CaptchaType
type TurnstileChecker ¶
func NewTurnstileChecker ¶
func NewTurnstileChecker(conf *config.TurnstileConf, user *User) *TurnstileChecker
func (*TurnstileChecker) Get ¶
func (c *TurnstileChecker) Get() ([]byte, error)
func (*TurnstileChecker) Type ¶
func (c *TurnstileChecker) Type() CaptchaType
Source Files ¶
Click to show internal directories.
Click to hide internal directories.