redis

package
v0.0.0-...-831d175 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr      string
	DB        int
	Password  string
	KeyPrefix string
}

Config redis配置参数

type Store

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

Store redis存储

func NewStore

func NewStore(cfg *Config) *Store

NewStore 创建基于redis存储实例

func (*Store) Check

func (a *Store) Check(tokenString string) (bool, error)

Check ...

func (*Store) Close

func (a *Store) Close() error

Close ...

func (*Store) Set

func (a *Store) Set(tokenString string, expiration time.Duration) error

Set ...

Jump to

Keyboard shortcuts

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