captcha

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default number of digits in captcha solution.
	DefaultLen      = 6
	DefaultDotCount = 30
	// The number of captchas created that triggers garbage collection used
	// by default store.
	CollectNum     = 100
	DefaultMaxSkew = 3
	// Expiration time of captchas used by default store.
	Expiration = 10 * time.Minute
	// Standard width and height of a captcha image.
	StdWidth  = 240
	StdHeight = 80
)

Variables

This section is empty.

Functions

func Generate

func Generate(e echo.Context) error

func Verify

func Verify(e echo.Context) error

Types

type ConfigJsonBody

type ConfigJsonBody struct {
	Id          string `json:"id"`
	VerifyValue string `json:"verify_value"`
	DriverDigit *base64Captcha.DriverDigit
}

type Store

type Store struct {
}

implementing Store interface

func (Store) Get

func (Store) Get(id string, clear bool) string

func (Store) Set

func (Store) Set(id string, value string)

func (Store) Verify

func (s Store) Verify(id, answer string, clear bool) bool

Jump to

Keyboard shortcuts

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