Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIp ¶
func CheckIp(rdb *redis.Client, ip string, dbCtx context.Context, timeWindow int, rateLimit int) (bool, error)
CheckIp checks if the IP has made more requests than the rate limit in the time window Returns true if the IP has made more requests than the rate limit, false otherwise Returns an error if there was an error checking the IP
func CreateDbConn ¶
CreateDbConn creates a new Redis client and returns the context and client
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.