Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CaptchaClient ¶
type CaptchaClient interface {
VerifyCaptcha(ctx context.Context, token string, action string) (bool, error)
}
func MakeClient ¶
func MakeClient(provider CaptchaProvider, recaptchaKey, turnstileKey string) CaptchaClient
type CaptchaProvider ¶
type CaptchaProvider string
const ( CaptchaProviderGoogleRecaptcha CaptchaProvider = "recaptcha" CaptchaProviderCloudflareTurnstile CaptchaProvider = "turnstile" CaptchaProviderOff CaptchaProvider = "off" )
func (CaptchaProvider) IsValid ¶
func (p CaptchaProvider) IsValid() bool
type RecaptchaClient ¶
type RecaptchaClient struct {
// contains filtered or unexported fields
}
func NewRecaptchaClient ¶
func NewRecaptchaClient(secretKey string) *RecaptchaClient
func (*RecaptchaClient) VerifyCaptcha ¶
type TurnStileClient ¶
type TurnStileClient struct {
// contains filtered or unexported fields
}
func NewTurnStileClient ¶
func NewTurnStileClient(secretKey string) *TurnStileClient
func (*TurnStileClient) VerifyCaptcha ¶
Click to show internal directories.
Click to hide internal directories.