loginattemptimpl

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateLoginAttemptCommand

type CreateLoginAttemptCommand struct {
	Username  string
	IpAddress string
}

type DeleteLoginAttemptsCommand

type DeleteLoginAttemptsCommand struct {
	Username string
}

type DeleteOldLoginAttemptsCommand

type DeleteOldLoginAttemptsCommand struct {
	OlderThan time.Time
}

type GetUserLoginAttemptCountQuery

type GetUserLoginAttemptCountQuery struct {
	Username string
	Since    time.Time
}

type Service

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

func ProvideService

func ProvideService(db db.DB, cfg *setting.Cfg, lock *serverlock.ServerLockService) *Service

func (*Service) Add

func (s *Service) Add(ctx context.Context, username, IPAddress string) error

func (*Service) Reset

func (s *Service) Reset(ctx context.Context, username string) error

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

func (*Service) Validate

func (s *Service) Validate(ctx context.Context, username string) (bool, error)

Jump to

Keyboard shortcuts

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