captcha

package
v0.0.0-...-fa26777 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CaptchaFailed = apierrors.Invalid.WithReason("CaptchaFailed")
View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(Provider), "*"),
	NewProviderLogger,
)
View Source
var ErrVerificationFailed = CaptchaFailed.NewWithCause("verification failed", apierrors.StringCause("VerificationFailed"))

Functions

This section is empty.

Types

type Provider

type Provider struct {
	RemoteIP         httputil.RemoteIP
	Config           *config.CaptchaConfig
	Logger           ProviderLogger
	CloudflareClient *captcha.CloudflareClient
}

func (*Provider) VerifyToken

func (p *Provider) VerifyToken(ctx context.Context, token string) error

type ProviderLogger

type ProviderLogger struct{ *log.Logger }

func NewProviderLogger

func NewProviderLogger(lf *log.Factory) ProviderLogger

Jump to

Keyboard shortcuts

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