cache

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

@Title @Description @Author Wangwengang 2021/8/24 下午8:21 @Update Wangwengang 2021/8/24 下午8:21

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup()

Types

type RedisV8

type RedisV8 struct {
	// contains filtered or unexported fields
}
var (
	Redis *RedisV8
)

func NewRedis

func NewRedis() (*RedisV8, error)

func (*RedisV8) Decrease

func (r *RedisV8) Decrease(key string) error

func (*RedisV8) Del

func (r *RedisV8) Del(key string) error

Del delete key in redis

func (*RedisV8) Expire

func (r *RedisV8) Expire(key string, dur time.Duration) error

Set ttl

func (*RedisV8) Get

func (r *RedisV8) Get(key string) (string, error)

func (*RedisV8) GetClient

func (r *RedisV8) GetClient() redis.UniversalClient

GetClient 暴露原生client

func (*RedisV8) HashDel

func (r *RedisV8) HashDel(hk, key string) error

HashDel delete key in specify redis's hashtable

func (*RedisV8) HashGet

func (r *RedisV8) HashGet(hk, key string) (string, error)

HashGet from key

func (*RedisV8) HashSet

func (r *RedisV8) HashSet(hk, key string, val interface{}) error

func (*RedisV8) Increase

func (r *RedisV8) Increase(key string) error

Increase

func (*RedisV8) Set

func (r *RedisV8) Set(key string, val interface{}, expire int) error

Set value with key and expire time

func (*RedisV8) String

func (r *RedisV8) String() string

Jump to

Keyboard shortcuts

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