hcaptcha

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HCaptchaError

type HCaptchaError struct {
	SiteKey string
	Cause   error
}

func (*HCaptchaError) Error

func (h *HCaptchaError) Error() string

type HCaptchaValidator

type HCaptchaValidator func(ctx context.Context, token, personIP string) error

func NewHCaptchaValidator

func NewHCaptchaValidator(siteKey, secretKey string) HCaptchaValidator

func NewMemoryCachedValidator

func NewMemoryCachedValidator(d time.Duration, v HCaptchaValidator) HCaptchaValidator

type Option

type Option func(*options) error

func WithAllowedActions

func WithAllowedActions(actions ...string) Option

func WithDefaultOptions

func WithDefaultOptions() Option

func WithEndpoint

func WithEndpoint(URL string) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

func WithHostname

func WithHostname(name string) Option

func WithSecret

func WithSecret(key string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL