Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
type RedisStore struct { Expiration time.Duration PreKey string Context context.Context Redis *redis.Redis }
RedisStore stores captcha data.
func NewRedisStore ¶
func NewRedisStore(r *redis.Redis) *RedisStore
NewRedisStore returns a redis store for captcha.
func (*RedisStore) Get ¶
func (r *RedisStore) Get(key string, clear bool) string
Get gets the captcha KV from redis.
func (*RedisStore) Set ¶
func (r *RedisStore) Set(id string, value string) error
Set sets the captcha KV to redis.
func (*RedisStore) UseWithCtx ¶
func (r *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store
UseWithCtx add context for captcha.
Click to show internal directories.
Click to hide internal directories.