redisdb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package implements the redis database helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRedis

func GetRedis() *goredis.Client

GetRedis function returns a pointer to the `goredis.Client` instance used to communicate with Redis server. The function simply returns the Redis client instance stored in a `redisdb` singleton object. This function is used to obtain the Redis client connection in other parts of the application.

func New

func New(dbc *databasecredhelper.VaultDBCredentials, host string, port string) *rediscon

func Ping

func Ping() bool

Ping the redis connection

Types

type RedisDB

type RedisDB interface {
	Get(ctx context.Context, key string, output *string) error
	Set(ctx context.Context, key string, value interface{}) error
	Delete(ctx context.Context, key string) error
	GetJSON(context.Context, string, string, interface{}) error
	SetJSON(ctx context.Context, key string, path string, value interface{}) error
	clients.CommonClient
}

Jump to

Keyboard shortcuts

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