ratelimit

package
v0.0.0-...-c66872d Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateLimiter

type RateLimiter struct {
	// contains filtered or unexported fields
}

func New

func New(db *sql.DB, MaxAttempts int, Interval time.Duration) RateLimiter

func (*RateLimiter) CanPass

func (r *RateLimiter) CanPass(ctx context.Context, userID int64) (bool, error)

Jump to

Keyboard shortcuts

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