Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReCaptcha ¶
type ReCaptcha interface {
Verify(recaptchaResponse string) (VerifyResponse, error)
}
ReCaptcha verifies captcha response.
type ReCaptchaFake ¶
type ReCaptchaFake struct {
// contains filtered or unexported fields
}
ReCaptchaFake represents in memory implementation of ReCaptcha service.
func NewReCaptchaFake ¶
func NewReCaptchaFake(verifyResponse VerifyResponse) ReCaptchaFake
NewReCaptchaFake creates in memory fake reCaptcha service with predefined response.
func (ReCaptchaFake) Verify ¶
func (r ReCaptchaFake) Verify(recaptchaResponse string) (VerifyResponse, error)
Verify verifies captcha response.
type ReCaptchaVerifier ¶
type ReCaptchaVerifier struct {
// contains filtered or unexported fields
}
ReCaptchaVerifier verifies incoming network using ReCaptcha to prevent spamming attacks.
func NewReCaptchaVerifier ¶
func NewReCaptchaVerifier(service ReCaptcha) ReCaptchaVerifier
NewReCaptchaVerifier creates new ReCaptcha-backed request verifier.
type VerifierFake ¶
type VerifierFake struct{}
VerifierFake turns off human verification during local development.
func NewVerifierFake ¶
func NewVerifierFake() VerifierFake
NewVerifierFake creates new fake request verifier.
Click to show internal directories.
Click to hide internal directories.