mocks

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMailer

type MockMailer struct {
	mock.Mock
}

MockMailer is an autogenerated mock type for the Mailer type

func NewMockMailer

func NewMockMailer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMailer

NewMockMailer creates a new instance of MockMailer. 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 (*MockMailer) EXPECT

func (_m *MockMailer) EXPECT() *MockMailer_Expecter

func (*MockMailer) SendAccountCreatedEmail

func (_mock *MockMailer) SendAccountCreatedEmail(ctx context.Context, to string, username string, plainPassword string) error

SendAccountCreatedEmail provides a mock function for the type MockMailer

func (*MockMailer) SendUserApprovedEmail

func (_mock *MockMailer) SendUserApprovedEmail(ctx context.Context, to string, username string) error

SendUserApprovedEmail provides a mock function for the type MockMailer

func (*MockMailer) SendUserRejectedEmail

func (_mock *MockMailer) SendUserRejectedEmail(ctx context.Context, to string, username string) error

SendUserRejectedEmail provides a mock function for the type MockMailer

func (*MockMailer) SendUserSoftDeletedEmail

func (_mock *MockMailer) SendUserSoftDeletedEmail(ctx context.Context, to string, username string, reason string) error

SendUserSoftDeletedEmail provides a mock function for the type MockMailer

func (*MockMailer) SendUserSuspendedEmail

func (_mock *MockMailer) SendUserSuspendedEmail(ctx context.Context, to string, username string, reason string) error

SendUserSuspendedEmail provides a mock function for the type MockMailer

func (*MockMailer) SendUserUnsuspendedEmail

func (_mock *MockMailer) SendUserUnsuspendedEmail(ctx context.Context, to string, username string) error

SendUserUnsuspendedEmail provides a mock function for the type MockMailer

type MockMailer_Expecter

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

func (*MockMailer_Expecter) SendAccountCreatedEmail

func (_e *MockMailer_Expecter) SendAccountCreatedEmail(ctx any, to any, username any, plainPassword any) *MockMailer_SendAccountCreatedEmail_Call

SendAccountCreatedEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string
  • plainPassword string

func (*MockMailer_Expecter) SendUserApprovedEmail

func (_e *MockMailer_Expecter) SendUserApprovedEmail(ctx any, to any, username any) *MockMailer_SendUserApprovedEmail_Call

SendUserApprovedEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string

func (*MockMailer_Expecter) SendUserRejectedEmail

func (_e *MockMailer_Expecter) SendUserRejectedEmail(ctx any, to any, username any) *MockMailer_SendUserRejectedEmail_Call

SendUserRejectedEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string

func (*MockMailer_Expecter) SendUserSoftDeletedEmail

func (_e *MockMailer_Expecter) SendUserSoftDeletedEmail(ctx any, to any, username any, reason any) *MockMailer_SendUserSoftDeletedEmail_Call

SendUserSoftDeletedEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string
  • reason string

func (*MockMailer_Expecter) SendUserSuspendedEmail

func (_e *MockMailer_Expecter) SendUserSuspendedEmail(ctx any, to any, username any, reason any) *MockMailer_SendUserSuspendedEmail_Call

SendUserSuspendedEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string
  • reason string

func (*MockMailer_Expecter) SendUserUnsuspendedEmail

func (_e *MockMailer_Expecter) SendUserUnsuspendedEmail(ctx any, to any, username any) *MockMailer_SendUserUnsuspendedEmail_Call

SendUserUnsuspendedEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string

type MockMailer_SendAccountCreatedEmail_Call

type MockMailer_SendAccountCreatedEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendAccountCreatedEmail_Call) Return

func (*MockMailer_SendAccountCreatedEmail_Call) Run

func (*MockMailer_SendAccountCreatedEmail_Call) RunAndReturn

func (_c *MockMailer_SendAccountCreatedEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string, plainPassword string) error) *MockMailer_SendAccountCreatedEmail_Call

type MockMailer_SendUserApprovedEmail_Call

type MockMailer_SendUserApprovedEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendUserApprovedEmail_Call) Return

func (*MockMailer_SendUserApprovedEmail_Call) Run

func (*MockMailer_SendUserApprovedEmail_Call) RunAndReturn

type MockMailer_SendUserRejectedEmail_Call

type MockMailer_SendUserRejectedEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendUserRejectedEmail_Call) Return

func (*MockMailer_SendUserRejectedEmail_Call) Run

func (*MockMailer_SendUserRejectedEmail_Call) RunAndReturn

type MockMailer_SendUserSoftDeletedEmail_Call

type MockMailer_SendUserSoftDeletedEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendUserSoftDeletedEmail_Call) Return

func (*MockMailer_SendUserSoftDeletedEmail_Call) Run

func (*MockMailer_SendUserSoftDeletedEmail_Call) RunAndReturn

type MockMailer_SendUserSuspendedEmail_Call

type MockMailer_SendUserSuspendedEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendUserSuspendedEmail_Call) Return

func (*MockMailer_SendUserSuspendedEmail_Call) Run

func (*MockMailer_SendUserSuspendedEmail_Call) RunAndReturn

type MockMailer_SendUserUnsuspendedEmail_Call

type MockMailer_SendUserUnsuspendedEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendUserUnsuspendedEmail_Call) Return

func (*MockMailer_SendUserUnsuspendedEmail_Call) Run

func (*MockMailer_SendUserUnsuspendedEmail_Call) RunAndReturn

type MockSoftDeleteStore

type MockSoftDeleteStore struct {
	mock.Mock
}

MockSoftDeleteStore is an autogenerated mock type for the SoftDeleteStore type

func NewMockSoftDeleteStore

func NewMockSoftDeleteStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSoftDeleteStore

NewMockSoftDeleteStore creates a new instance of MockSoftDeleteStore. 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 (*MockSoftDeleteStore) EXPECT

func (*MockSoftDeleteStore) GetSoftDeletedContentByID

func (_mock *MockSoftDeleteStore) GetSoftDeletedContentByID(ctx context.Context, id int) (*api.SoftDeletedContent, error)

GetSoftDeletedContentByID provides a mock function for the type MockSoftDeleteStore

func (*MockSoftDeleteStore) GetSoftDeletedContentByUser

func (_mock *MockSoftDeleteStore) GetSoftDeletedContentByUser(ctx context.Context, userID int) ([]*api.SoftDeletedContent, error)

GetSoftDeletedContentByUser provides a mock function for the type MockSoftDeleteStore

func (*MockSoftDeleteStore) RestoreContent

func (_mock *MockSoftDeleteStore) RestoreContent(ctx context.Context, contentType string, contentID int) error

RestoreContent provides a mock function for the type MockSoftDeleteStore

type MockSoftDeleteStore_Expecter

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

func (*MockSoftDeleteStore_Expecter) GetSoftDeletedContentByID

GetSoftDeletedContentByID is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockSoftDeleteStore_Expecter) GetSoftDeletedContentByUser

func (_e *MockSoftDeleteStore_Expecter) GetSoftDeletedContentByUser(ctx any, userID any) *MockSoftDeleteStore_GetSoftDeletedContentByUser_Call

GetSoftDeletedContentByUser is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockSoftDeleteStore_Expecter) RestoreContent

func (_e *MockSoftDeleteStore_Expecter) RestoreContent(ctx any, contentType any, contentID any) *MockSoftDeleteStore_RestoreContent_Call

RestoreContent is a helper method to define mock.On call

  • ctx context.Context
  • contentType string
  • contentID int

type MockSoftDeleteStore_GetSoftDeletedContentByID_Call

type MockSoftDeleteStore_GetSoftDeletedContentByID_Call struct {
	*mock.Call
}

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

func (*MockSoftDeleteStore_GetSoftDeletedContentByID_Call) Return

func (*MockSoftDeleteStore_GetSoftDeletedContentByID_Call) Run

func (*MockSoftDeleteStore_GetSoftDeletedContentByID_Call) RunAndReturn

type MockSoftDeleteStore_GetSoftDeletedContentByUser_Call

type MockSoftDeleteStore_GetSoftDeletedContentByUser_Call struct {
	*mock.Call
}

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

func (*MockSoftDeleteStore_GetSoftDeletedContentByUser_Call) Return

func (*MockSoftDeleteStore_GetSoftDeletedContentByUser_Call) Run

func (*MockSoftDeleteStore_GetSoftDeletedContentByUser_Call) RunAndReturn

type MockSoftDeleteStore_RestoreContent_Call

type MockSoftDeleteStore_RestoreContent_Call struct {
	*mock.Call
}

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

func (*MockSoftDeleteStore_RestoreContent_Call) Return

func (*MockSoftDeleteStore_RestoreContent_Call) Run

func (*MockSoftDeleteStore_RestoreContent_Call) RunAndReturn

func (_c *MockSoftDeleteStore_RestoreContent_Call) RunAndReturn(run func(ctx context.Context, contentType string, contentID int) error) *MockSoftDeleteStore_RestoreContent_Call

type MockUserStore

type MockUserStore struct {
	mock.Mock
}

MockUserStore is an autogenerated mock type for the UserStore type

func NewMockUserStore

func NewMockUserStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUserStore

NewMockUserStore creates a new instance of MockUserStore. 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 (*MockUserStore) EXPECT

func (_m *MockUserStore) EXPECT() *MockUserStore_Expecter

func (*MockUserStore) GetUserByID

func (_mock *MockUserStore) GetUserByID(ctx context.Context, userID int) (*user.User, error)

GetUserByID provides a mock function for the type MockUserStore

type MockUserStore_Expecter

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

func (*MockUserStore_Expecter) GetUserByID

func (_e *MockUserStore_Expecter) GetUserByID(ctx any, userID any) *MockUserStore_GetUserByID_Call

GetUserByID is a helper method to define mock.On call

  • ctx context.Context
  • userID int

type MockUserStore_GetUserByID_Call

type MockUserStore_GetUserByID_Call struct {
	*mock.Call
}

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

func (*MockUserStore_GetUserByID_Call) Return

func (_c *MockUserStore_GetUserByID_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByID_Call

func (*MockUserStore_GetUserByID_Call) Run

func (*MockUserStore_GetUserByID_Call) RunAndReturn

func (_c *MockUserStore_GetUserByID_Call) RunAndReturn(run func(ctx context.Context, userID int) (*user.User, error)) *MockUserStore_GetUserByID_Call

Jump to

Keyboard shortcuts

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