vcode

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("captcha: id not found")
)

Functions

This section is empty.

Types

type Vcode

type Vcode struct {
	// contains filtered or unexported fields
}

func New

func New(cli redis.Cmdable, cfg config.CaptchaConfig) *Vcode

func (*Vcode) GenerateBase64

func (vc *Vcode) GenerateBase64(id string) (string, error)

func (*Vcode) GenerateImage

func (vc *Vcode) GenerateImage(w io.Writer, id string) error

func (*Vcode) NewLen

func (vc *Vcode) NewLen(length int) (id string)

func (*Vcode) Reload

func (vc *Vcode) Reload(id string) bool

func (*Vcode) Verify

func (vc *Vcode) Verify(id, answer string, clear bool) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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