Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginAttempt ¶
type Service ¶
type Service interface { // Add adds a new login attempt record for provided username Add(ctx context.Context, username, IPAddress string) error // Validate checks if username has to many login attempts inside a window. // Will return true if provided username do not have too many attempts. Validate(ctx context.Context, username string) (bool, error) // Reset resets all login attempts attached to username Reset(ctx context.Context, username string) error }
Click to show internal directories.
Click to hide internal directories.