captcha

package
v0.0.0-...-f9738e6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfs map[string]*config.Captcha, watcher config.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, email 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
}

type Sender

type Sender struct {
	UUID string
	Send func(conf *config.Captcha, answer string, expire time.Duration) (string, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳