Documentation ¶
Index ¶
- type AntiBruteForceService
- func (a *AntiBruteForceService) AddToBlackList(ctx context.Context, n *net.IPNet) error
- func (a *AntiBruteForceService) AddToWhiteList(ctx context.Context, n *net.IPNet) error
- func (a *AntiBruteForceService) CheckAuth(ctx context.Context, auth *models.Auth) (bool, error)
- func (a *AntiBruteForceService) CheckBucketLimit(ctx context.Context, id string, rate uint64) (bool, error)
- func (a *AntiBruteForceService) DeleteFromBlackList(ctx context.Context, n *net.IPNet) error
- func (a *AntiBruteForceService) DeleteFromWhiteList(ctx context.Context, n *net.IPNet) error
- func (a *AntiBruteForceService) ResetLimit(ctx context.Context, login string, ip *net.IP) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AntiBruteForceService ¶
type AntiBruteForceService struct { BucketStorage interfaces.BucketStorage ConfigStorage interfaces.ConfigStorage LoginLimit uint64 PasswordLimit uint64 IPLimit uint64 }
AntiBruteForceService struct
func NewAntiBruteForceService ¶
func NewAntiBruteForceService( bucketStorage interfaces.BucketStorage, configStorage interfaces.ConfigStorage, loginLimit uint64, passwordLimit uint64, ipLimit uint64) *AntiBruteForceService
NewAntiBruteForceService Constructor for AntiBruteForceService
func (*AntiBruteForceService) AddToBlackList ¶
AddToBlackList Method to add IP address to Blacklist
func (*AntiBruteForceService) AddToWhiteList ¶
AddToWhiteList Method to add IP address to Whitelist
func (*AntiBruteForceService) CheckBucketLimit ¶
func (a *AntiBruteForceService) CheckBucketLimit(ctx context.Context, id string, rate uint64) (bool, error)
CheckBucketLimit Method to check limit for particular bucket
func (*AntiBruteForceService) DeleteFromBlackList ¶
DeleteFromBlackList Method to add IP address from Blacklist
func (*AntiBruteForceService) DeleteFromWhiteList ¶
DeleteFromWhiteList Method to delete IP address from Whitelist
func (*AntiBruteForceService) ResetLimit ¶
ResetLimit Method to reset limits for login/IP address pair
Click to show internal directories.
Click to hide internal directories.