Documentation
¶
Index ¶
Constants ¶
View Source
const RedisCaptchaCurNumKey = "captcha:cur"
RedisCaptchaCurNumKey 当前验证码数量
View Source
const RedisCaptchaMaxNumKey = "captcha:max"
RedisCaptchaMaxNumKey 保有的验证码最大数量
View Source
const RedisCaptchaStorePrefix = "captcha:collects:"
RedisCaptchaStorePrefix 验证码种子集合前缀
Variables ¶
View Source
var ModuleContext moduleWrapper
ModuleContext 模块上下文
Functions ¶
Types ¶
type RedisCaptchaStore ¶
type RedisCaptchaStore struct {
// contains filtered or unexported fields
}
func NewRedisCaptchaStore ¶
func NewRedisCaptchaStore(collectNum int, expiration time.Duration) *RedisCaptchaStore
func (*RedisCaptchaStore) Get ¶
func (store *RedisCaptchaStore) Get(id string, clear bool) (digits []byte)
func (*RedisCaptchaStore) Set ¶
func (store *RedisCaptchaStore) Set(id string, digits []byte)
Click to show internal directories.
Click to hide internal directories.