Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
RedisStore 是使用 Redis 实现的自定义验证码存储结构体
func NewRedisStore ¶
func NewRedisStore(redisClient *redis.Client, expiry time.Duration) *RedisStore
NewRedisStore 创建一个 RedisStore 实例
func (*RedisStore) Get ¶
func (s *RedisStore) Get(id string, clear bool) string
Get 从 Redis 中获取指定 id 的验证码 如果 clear 为 true,则从 Redis 中删除该验证码
Click to show internal directories.
Click to hide internal directories.