mocks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAPIKeyVerifier

type MockAPIKeyVerifier struct {
	mock.Mock
}

MockAPIKeyVerifier is an autogenerated mock type for the APIKeyVerifier type

func NewMockAPIKeyVerifier

func NewMockAPIKeyVerifier(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAPIKeyVerifier

NewMockAPIKeyVerifier creates a new instance of MockAPIKeyVerifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAPIKeyVerifier) EXPECT

func (*MockAPIKeyVerifier) UpdateLastUsed

func (_mock *MockAPIKeyVerifier) UpdateLastUsed(ctx context.Context, id int, ip string) error

UpdateLastUsed provides a mock function for the type MockAPIKeyVerifier

func (*MockAPIKeyVerifier) Verify

func (_mock *MockAPIKeyVerifier) Verify(ctx context.Context, fullKey string) (*apikey.APIKey, error)

Verify provides a mock function for the type MockAPIKeyVerifier

type MockAPIKeyVerifier_Expecter

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

func (*MockAPIKeyVerifier_Expecter) UpdateLastUsed

UpdateLastUsed is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • ip string

func (*MockAPIKeyVerifier_Expecter) Verify

Verify is a helper method to define mock.On call

  • ctx context.Context
  • fullKey string

type MockAPIKeyVerifier_UpdateLastUsed_Call

type MockAPIKeyVerifier_UpdateLastUsed_Call struct {
	*mock.Call
}

MockAPIKeyVerifier_UpdateLastUsed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateLastUsed'

func (*MockAPIKeyVerifier_UpdateLastUsed_Call) Return

func (*MockAPIKeyVerifier_UpdateLastUsed_Call) Run

func (*MockAPIKeyVerifier_UpdateLastUsed_Call) RunAndReturn

type MockAPIKeyVerifier_Verify_Call

type MockAPIKeyVerifier_Verify_Call struct {
	*mock.Call
}

MockAPIKeyVerifier_Verify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Verify'

func (*MockAPIKeyVerifier_Verify_Call) Return

func (*MockAPIKeyVerifier_Verify_Call) Run

func (*MockAPIKeyVerifier_Verify_Call) RunAndReturn

type MockUserLookup

type MockUserLookup struct {
	mock.Mock
}

MockUserLookup is an autogenerated mock type for the UserLookup type

func NewMockUserLookup

func NewMockUserLookup(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUserLookup

NewMockUserLookup creates a new instance of MockUserLookup. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockUserLookup) EXPECT

func (*MockUserLookup) GetUserByID

func (_mock *MockUserLookup) GetUserByID(ctx context.Context, userID int) (*repository.User, error)

GetUserByID provides a mock function for the type MockUserLookup

type MockUserLookup_Expecter

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

func (*MockUserLookup_Expecter) GetUserByID

func (_e *MockUserLookup_Expecter) GetUserByID(ctx any, userID any) *MockUserLookup_GetUserByID_Call

GetUserByID is a helper method to define mock.On call

  • ctx context.Context
  • userID int

type MockUserLookup_GetUserByID_Call

type MockUserLookup_GetUserByID_Call struct {
	*mock.Call
}

MockUserLookup_GetUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByID'

func (*MockUserLookup_GetUserByID_Call) Return

func (*MockUserLookup_GetUserByID_Call) Run

func (*MockUserLookup_GetUserByID_Call) RunAndReturn

Jump to

Keyboard shortcuts

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