recaptcha

package
v0.0.0-...-347c5ff Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Recaptchas

type Recaptchas struct {
	Next  httpserver.Handler
	Rules []Rule
}

func (Recaptchas) ServeHTTP

func (h Recaptchas) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)

type Rule

type Rule interface {
	Validate(r *http.Request) bool
}

type V2Rule

type V2Rule struct {
	Secret string
	Method string
	Path   string
}

func (V2Rule) Validate

func (rule V2Rule) Validate(r *http.Request) bool

type V3Rule

type V3Rule struct {
	Secret    string
	Action    string
	Threshold float64
	Method    string
	Path      string
}

func (V3Rule) Validate

func (rule V3Rule) Validate(r *http.Request) bool

Jump to

Keyboard shortcuts

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