drivers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient() *mongo.Client

func Initialize

func Initialize() error

Types

type MongoDB

type MongoDB struct{}

func (MongoDB) Close

func (r MongoDB) Close() error

func (MongoDB) Delete

func (r MongoDB) Delete(key string) error

func (MongoDB) Exists

func (r MongoDB) Exists(key string) (bool, error)

func (MongoDB) Expire

func (r MongoDB) Expire(key string, seconds int) error

func (MongoDB) Flush

func (r MongoDB) Flush() error

func (MongoDB) Get

func (r MongoDB) Get(key string) (interface{}, error)

func (MongoDB) Ping

func (r MongoDB) Ping() error

func (MongoDB) Set

func (r MongoDB) Set(key string, value interface{}) error

func (MongoDB) TTL

func (r MongoDB) TTL(key string) (int, error)

type Redis

type Redis struct{}

func (Redis) Close

func (r Redis) Close() error

func (Redis) Delete

func (r Redis) Delete(key string) error

func (Redis) Exists

func (r Redis) Exists(key string) (bool, error)

func (Redis) Expire

func (r Redis) Expire(key string, seconds int) error

func (Redis) Flush

func (r Redis) Flush() error

func (Redis) Get

func (r Redis) Get(key string) (interface{}, error)

func (Redis) Ping

func (r Redis) Ping() error

func (Redis) Set

func (r Redis) Set(key string, value interface{}) error

func (Redis) TTL

func (r Redis) TTL(key string) (int, error)

type RedisVersionType

type RedisVersionType interface {
	*redisV8.Client | *redisV9.Client | any
}

func GetRedisClient

func GetRedisClient() RedisVersionType

Jump to

Keyboard shortcuts

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