captcha

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfs map[string]ec.Captcha, watcher *watcher.Watcher)

Types

type Captcha

type Captcha interface {
	Email(tp string, ip string, to string) (Response, error)
	Image(tp string, ip string) (Response, error)
	VerifyEmail(tp, ip, id, answer string) error
	VerifyImage(tp, ip, id, answer string) error
}

func Instance

func Instance() Captcha

type Response

type Response interface {
	ID() string
	Expire() time.Duration
	Base64String() string
}

Jump to

Keyboard shortcuts

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