Documentation ¶
Overview ¶
Package limiter implements various rate limiting functions for login protection and API access limiting. It uses cache2go - https://github.com/muesli/cache2go library to limit 3d party dependencies, e.g redis. cache2go has an expiry functionallity so we do not have to store and handle how to expire stored failed logins
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiLimitReached ¶
ApiLimitReached checks if the login limit is reached for a specific IP Return true if login attempts reached the limit, false otherwise.
func ApiRecordRequest ¶
ApiRecordRequest records a new API request Returns the current requests and the request limit
func LoginLimitReached ¶
LoginLimitReached checks if the login limit is reached for a specific IP Return true if login attempts reached the limit, false otherwise.
Types ¶
This section is empty.