redis

package
v0.0.0-...-683a4be Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package redis is where we place all funcs related to redis operations

Index

Constants

View Source
const NetworkTCP string = "tcp"

NetworkTCP is the default network TCP

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis struct {
	Pool *redigo.Pool
	// contains filtered or unexported fields
}

Redis main struct

func InitRedis

func InitRedis(redisConfig config.RedisConfigWrap) *Redis

InitRedis is a func to initialize redis that we are going to use

func (*Redis) KeysPrefix

func (r *Redis) KeysPrefix(prefix string) ([]string, error)

KeysPrefix get keys by a defined prefix

func (*Redis) SAdd

func (r *Redis) SAdd(key string, args []interface{}) (int64, error)

SAdd add an item into a set

func (*Redis) SMembers

func (r *Redis) SMembers(key string) ([]string, error)

SMembers get members of a set

func (*Redis) SRem

func (r *Redis) SRem(keyRedis string, members []interface{}) (int64, error)

SRem remove an item from a set

Jump to

Keyboard shortcuts

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