Help us shape the future of Go! Take the 2026 Go Developer Survey

captcha

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCaptchaNotExists    = errors.NewPublic("the captcha does not exists")
	ErrCaptchaInconsistent = errors.NewPublic("tha captcha is invalid")
)

Functions

This section is empty.

Types

type Captcha

type Captcha struct {
	RDb *redis.Client
}

func New

func New(rdb *redis.Client) *Captcha

func (*Captcha) Create

func (x *Captcha) Create(ctx context.Context, name string, code string, ttl time.Duration) string

func (*Captcha) Delete

func (x *Captcha) Delete(ctx context.Context, name string) int64

func (*Captcha) Exists

func (x *Captcha) Exists(ctx context.Context, name string) bool

func (*Captcha) Key

func (x *Captcha) Key(name string) string

func (*Captcha) Verify

func (x *Captcha) Verify(ctx context.Context, name string, code string) error

Jump to

Keyboard shortcuts

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