Documentation ¶
Index ¶
- type PsqlAntibruteforceRepository
- func (p PsqlAntibruteforceRepository) BlacklistAdd(ctx context.Context, subnet string) error
- func (p PsqlAntibruteforceRepository) BlacklistRemove(ctx context.Context, subnet string) error
- func (p PsqlAntibruteforceRepository) FindIPInList(ctx context.Context, ip string) (string, error)
- func (p PsqlAntibruteforceRepository) WhitelistAdd(ctx context.Context, subnet string) error
- func (p PsqlAntibruteforceRepository) WhitelistRemove(ctx context.Context, subnet string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PsqlAntibruteforceRepository ¶
PsqlAntibruteforceRepository is Repository implementation for postgres
func NewPsqlAntibruteforceRepository ¶
func NewPsqlAntibruteforceRepository(DB *sqlx.DB, logger *zap.Logger) *PsqlAntibruteforceRepository
NewPsqlAntibruteforceRepository constructor for postgres repository
func (PsqlAntibruteforceRepository) BlacklistAdd ¶
func (p PsqlAntibruteforceRepository) BlacklistAdd(ctx context.Context, subnet string) error
BlacklistAdd adding subnet to blacklist
func (PsqlAntibruteforceRepository) BlacklistRemove ¶
func (p PsqlAntibruteforceRepository) BlacklistRemove(ctx context.Context, subnet string) error
BlacklistRemove removing subnet from blacklist
func (PsqlAntibruteforceRepository) FindIPInList ¶
FindIPInList finding IP in blacklist or whitelist, possible values: "blacklist", "whitelist", "" If ip find in both, returns "blacklist"
func (PsqlAntibruteforceRepository) WhitelistAdd ¶
func (p PsqlAntibruteforceRepository) WhitelistAdd(ctx context.Context, subnet string) error
WhitelistAdd adding subnet to whitelist
func (PsqlAntibruteforceRepository) WhitelistRemove ¶
func (p PsqlAntibruteforceRepository) WhitelistRemove(ctx context.Context, subnet string) error
WhitelistRemove removing subnet from whitelist
Click to show internal directories.
Click to hide internal directories.