store

package
v0.0.0-...-3fc60fe Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

@Time : 2019/10/20 17:30 @Author : Barry

Index

Constants

This section is empty.

Variables

View Source
var (
	Re error
	Rs *cache.Cache
)
View Source
var Mysql *xorm.Engine

Functions

func Brpop

func Brpop(prefix, key string, callback func([]byte))

func Delete

func Delete(prefix, key string) error

func Get

func Get(prefix, key string) interface{}

func GetRedisTTL

func GetRedisTTL(prefix, key string) time.Duration

func Incrby

func Incrby(prefix, key string, num int) (interface{}, error)

func IsExist

func IsExist(merchant, key string) bool

func LPush

func LPush(prefix, key string, val interface{}) error

func LRem

func LRem(prefix, key string, count int, val interface{}) error

func NewMysqlEngine

func NewMysqlEngine() *xorm.Engine

*

  • 实例化数据库引擎方法:mysql的数据引擎

func Put

func Put(prefix, key string, val interface{}, timeout time.Duration) error

func RedisBytes

func RedisBytes(prefix, key string) (data []byte, err error)

func RedisInt

func RedisInt(prefix, key string) (data int, err error)

func RedisString

func RedisString(prefix, key string) (data string, err error)

func SetNX

func SetNX(prefix, key string, val interface{}, timeout time.Duration) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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