basicredis

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToDb

func ConnectToDb(addr string, port string, db int) *redis.Client

ConnectToDb use emtpy string for hardcoded port

func GetTokenFromDB

func GetTokenFromDB(client *redis.Client, key string) (string, error)

GetTokenFromDB is delegated to retrieve the token from Redis

func GetValueFromDB

func GetValueFromDB(client *redis.Client, key string, dest interface{}) error

GetValueFromDB is delegated to check if a key is alredy inserted and return the value in the dest variable in signature

func InsertTokenIntoDB

func InsertTokenIntoDB(client *redis.Client, key string, value string, expire int) error

InsertTokenIntoDB set the two value into the Databased pointed from the client

func InsertValueIntoDB

func InsertValueIntoDB(client *redis.Client, key string, value interface{}) error

InsertValueIntoDB is delegated to save a general structure into redis

func RemoveValueFromDB

func RemoveValueFromDB(client *redis.Client, key string) error

RemoveValueFromDB is delegated to check if a key is alredy inserted and return the value

Types

This section is empty.

Jump to

Keyboard shortcuts

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