redisdb

package module
v0.0.0-...-bf07677 Latest Latest
Warning

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

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

README

STATUS: Under Development

Description

Simple wrapper for redis DB

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupDatabase

func SetupDatabase(redisURL string) *redis.Pool

noinspection GoUnusedExportedFunction

Types

type RedisDatabase

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

func GetDatabase

func GetDatabase(pool *redis.Pool) RedisDatabase

noinspection GoUnusedExportedFunction

func (*RedisDatabase) Delete

func (d *RedisDatabase) Delete(key string) error

func (*RedisDatabase) Exists

func (d *RedisDatabase) Exists(key string) (bool, error)

func (*RedisDatabase) Get

func (d *RedisDatabase) Get(key string) ([]byte, error)

func (*RedisDatabase) GetKeys

func (d *RedisDatabase) GetKeys(pattern string) ([]string, error)

func (*RedisDatabase) HDelete

func (d *RedisDatabase) HDelete(key string, hashKey string) (int, error)

func (*RedisDatabase) HExists

func (d *RedisDatabase) HExists(key string, hashKey string) (bool, error)

func (*RedisDatabase) HMGet

func (d *RedisDatabase) HMGet(key string, fields ...string) (map[string]string, error)

func (*RedisDatabase) HMGetAll

func (d *RedisDatabase) HMGetAll(key string) map[string]string

func (*RedisDatabase) HMGetKeys

func (d *RedisDatabase) HMGetKeys(key string) []string

func (*RedisDatabase) HMSet

func (d *RedisDatabase) HMSet(key string, hashKey string, value []byte) error

func (*RedisDatabase) Incr

func (d *RedisDatabase) Incr(counterKey string) (int, error)

func (*RedisDatabase) Ping

func (d *RedisDatabase) Ping() error

func (*RedisDatabase) Set

func (d *RedisDatabase) Set(key string, value []byte) error

Jump to

Keyboard shortcuts

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