redisdb

package
v0.0.0-...-29fd846 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LatestDate string
View Source
var Rdbpool *redis.Pool

Functions

func AllowAPIRequest

func AllowAPIRequest(ip string) bool

AllowAPIRequest determines whether an API request should be allowed or not

func GetExchangeRate

func GetExchangeRate(date, from, to string) (map[string]interface{}, error)

GetExchangeRate retrieves the rate for the day from Redis

func SaveExchangeRates

func SaveExchangeRates()

SaveExchangeRates to Redis Insert data of previous days exchange rate when a day is missing Previous day is always present since we are fetching it from the DB

Types

This section is empty.

Jump to

Keyboard shortcuts

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