store

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisStore

func NewRedisStore(cli redis.Cmdable, expiration time.Duration,
	prefix ...string) base64Captcha.Store

NewRedisStoreWithCli create an instance of a redis store

func NewStore

func NewStore(opts *redis.Options, expiration time.Duration,
	prefix ...string) base64Captcha.Store

NewStore create an instance of a redis store

Types

type Logger

type Logger interface {
	Printf(format string, args ...interface{})
}

Logger Define the log output interface

type RedisStore

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

func (*RedisStore) Get

func (rs *RedisStore) Get(id string, clear bool) string

func (*RedisStore) Set

func (rs *RedisStore) Set(id string, value string)

func (*RedisStore) Verify

func (rs *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