redis

package
v0.0.0-...-9a786c4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Rdb *redis.Client

Functions

func InitClient

func InitClient() bool

初始化Redis连接

func ReadChptcha

func ReadChptcha(phoneNum string) (verifyCode string, err error)

从缓存中获取验证码&有效期

func TestRedis

func TestRedis()

----------- Test Method ----------- 实验 Redis 基本读写操作

func WriteChptcha

func WriteChptcha(phoneNum string, verifyCode string) bool

----------- Public Method ----------- 将验证码保存至缓存中

Types

This section is empty.

Jump to

Keyboard shortcuts

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