loginattempttest

package
v0.0.0-kmdagger1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeLoginAttemptService

type FakeLoginAttemptService struct {
	ExpectedValid bool
	ExpectedErr   error
}

func (FakeLoginAttemptService) Add

func (f FakeLoginAttemptService) Add(ctx context.Context, username, IPAddress string) error

func (FakeLoginAttemptService) Reset

func (f FakeLoginAttemptService) Reset(ctx context.Context, username string) error

func (FakeLoginAttemptService) Validate

func (f FakeLoginAttemptService) Validate(ctx context.Context, username string) (bool, error)

type MockLoginAttemptService

type MockLoginAttemptService struct {
	AddCalled      bool
	ResetCalled    bool
	ValidateCalled bool

	ExpectedValid bool
	ExpectedErr   error
}

func (*MockLoginAttemptService) Add

func (f *MockLoginAttemptService) Add(ctx context.Context, username, IPAddress string) error

func (*MockLoginAttemptService) Reset

func (f *MockLoginAttemptService) Reset(ctx context.Context, username string) error

func (*MockLoginAttemptService) Validate

func (f *MockLoginAttemptService) 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