Documentation ¶
Index ¶
- func ConnectToDb(addr string, port string, db int) *redis.Client
- func GetTokenFromDB(client *redis.Client, key string) (string, error)
- func GetValueFromDB(client *redis.Client, key string, dest interface{}) error
- func InsertTokenIntoDB(client *redis.Client, key string, value string, expire int) error
- func InsertValueIntoDB(client *redis.Client, key string, value interface{}) error
- func RemoveValueFromDB(client *redis.Client, key string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToDb ¶
ConnectToDb use emtpy string for hardcoded port
func GetTokenFromDB ¶
GetTokenFromDB is delegated to retrieve the token from Redis
func GetValueFromDB ¶
GetValueFromDB is delegated to check if a key is alredy inserted and return the value in the dest variable in signature
func InsertTokenIntoDB ¶
InsertTokenIntoDB set the two value into the Databased pointed from the client
func InsertValueIntoDB ¶
InsertValueIntoDB is delegated to save a general structure into redis
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.