captchak

package
v0.0.0-...-1146c2f Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Driver string `json:",optional,default=digit,options=digit|string|math|chinese"`
	Length int    `json:",optional,default=6"`
	Width  int    `json:",optional,default=240"`
	Height int    `json:",optional,default=80"`
}

func (*Config) New

func (c *Config) New(r *redis.Client) *base64Captcha.Captcha

type RedisStore

type RedisStore struct {
	Prefix string
	Redis  *redis.Client
	Expire time.Duration
}

func (*RedisStore) Get

func (s *RedisStore) Get(key string, clear bool) string

func (*RedisStore) Set

func (s *RedisStore) Set(id string, value string) error

func (*RedisStore) Verify

func (s *RedisStore) Verify(id, answer string, clear bool) bool

Jump to

Keyboard shortcuts

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