database

package
v0.0.0-...-5643a2b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 6 Imported by: 0

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

func CreateDbConn() (context.Context, *redis.Client)

CreateDbConn creates a new Redis client and returns the context and client

Types

This section is empty.

Jump to

Keyboard shortcuts

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