captcha

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptchaGenerator

type CaptchaGenerator interface {
	Generate() (string, string, error)
}

func NewImageCaptcha

func NewImageCaptcha(options ...Option) CaptchaGenerator

func NewMobileDigitCaptcha added in v2.0.32

func NewMobileDigitCaptcha(mobile string, options ...Option) CaptchaGenerator

type CaptchaStore

type CaptchaStore interface {
	Set(captchaId string, value string, expires int) error
	Get(captchaId string, clear bool) (string, error)
	Verify(captchaId, captcha string, clear bool) (bool, error)
}

func Store

func Store(args ...string) CaptchaStore

type Option

type Option func(*captchaOption)

func WithExpires

func WithExpires(expires int) Option

func WithHeight

func WithHeight(height int) Option

func WithLength

func WithLength(length int) Option

func WithWidth

func WithWidth(width int) Option

Jump to

Keyboard shortcuts

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