mocks

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 3 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 MockCommentRepository

type MockCommentRepository struct {
	mock.Mock
}

MockCommentRepository is an autogenerated mock type for the CommentRepository type

func NewMockCommentRepository

func NewMockCommentRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCommentRepository

NewMockCommentRepository creates a new instance of MockCommentRepository. 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 (*MockCommentRepository) Count

func (_mock *MockCommentRepository) Count(ctx context.Context, userID int) (int, error)

Count provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) Create

func (_mock *MockCommentRepository) Create(ctx context.Context, comment *comments.Comment) error

Create provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) Delete

func (_mock *MockCommentRepository) Delete(ctx context.Context, id int) error

Delete provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) DeleteByUserID

func (_mock *MockCommentRepository) DeleteByUserID(ctx context.Context, userID int) error

DeleteByUserID provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) EXPECT

func (*MockCommentRepository) GetByContentID

func (_mock *MockCommentRepository) GetByContentID(ctx context.Context, contentID int) ([]*comments.Comment, error)

GetByContentID provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) GetByContentIDForModeration

func (_mock *MockCommentRepository) GetByContentIDForModeration(ctx context.Context, contentID int) ([]*comments.Comment, error)

GetByContentIDForModeration provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) GetByID

func (_mock *MockCommentRepository) GetByID(ctx context.Context, id int) (*comments.Comment, error)

GetByID provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) GetByStatus

func (_mock *MockCommentRepository) GetByStatus(ctx context.Context, status comments.CommentStatus) ([]*comments.Comment, error)

GetByStatus provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) GetByUserID

func (_mock *MockCommentRepository) GetByUserID(ctx context.Context, userID int) ([]*comments.Comment, error)

GetByUserID provides a mock function for the type MockCommentRepository

func (*MockCommentRepository) UpdateStatus

func (_mock *MockCommentRepository) UpdateStatus(ctx context.Context, id int, status comments.CommentStatus) error

UpdateStatus provides a mock function for the type MockCommentRepository

type MockCommentRepository_Count_Call

type MockCommentRepository_Count_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_Count_Call) Return

func (*MockCommentRepository_Count_Call) Run

func (*MockCommentRepository_Count_Call) RunAndReturn

type MockCommentRepository_Create_Call

type MockCommentRepository_Create_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_Create_Call) Return

func (*MockCommentRepository_Create_Call) Run

func (_c *MockCommentRepository_Create_Call) Run(run func(ctx context.Context, comment *comments.Comment)) *MockCommentRepository_Create_Call

func (*MockCommentRepository_Create_Call) RunAndReturn

func (_c *MockCommentRepository_Create_Call) RunAndReturn(run func(ctx context.Context, comment *comments.Comment) error) *MockCommentRepository_Create_Call

type MockCommentRepository_DeleteByUserID_Call

type MockCommentRepository_DeleteByUserID_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_DeleteByUserID_Call) Return

func (*MockCommentRepository_DeleteByUserID_Call) Run

func (*MockCommentRepository_DeleteByUserID_Call) RunAndReturn

type MockCommentRepository_Delete_Call

type MockCommentRepository_Delete_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_Delete_Call) Return

func (*MockCommentRepository_Delete_Call) Run

func (*MockCommentRepository_Delete_Call) RunAndReturn

type MockCommentRepository_Expecter

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

func (*MockCommentRepository_Expecter) Count

Count is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockCommentRepository_Expecter) Create

Create is a helper method to define mock.On call

  • ctx context.Context
  • comment *comments.Comment

func (*MockCommentRepository_Expecter) Delete

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockCommentRepository_Expecter) DeleteByUserID

DeleteByUserID is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockCommentRepository_Expecter) GetByContentID

GetByContentID is a helper method to define mock.On call

  • ctx context.Context
  • contentID int

func (*MockCommentRepository_Expecter) GetByContentIDForModeration

func (_e *MockCommentRepository_Expecter) GetByContentIDForModeration(ctx any, contentID any) *MockCommentRepository_GetByContentIDForModeration_Call

GetByContentIDForModeration is a helper method to define mock.On call

  • ctx context.Context
  • contentID int

func (*MockCommentRepository_Expecter) GetByID

GetByID is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockCommentRepository_Expecter) GetByStatus

GetByStatus is a helper method to define mock.On call

  • ctx context.Context
  • status comments.CommentStatus

func (*MockCommentRepository_Expecter) GetByUserID

GetByUserID is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockCommentRepository_Expecter) UpdateStatus

UpdateStatus is a helper method to define mock.On call

  • ctx context.Context
  • id int
  • status comments.CommentStatus

type MockCommentRepository_GetByContentIDForModeration_Call

type MockCommentRepository_GetByContentIDForModeration_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_GetByContentIDForModeration_Call) Return

func (*MockCommentRepository_GetByContentIDForModeration_Call) Run

func (*MockCommentRepository_GetByContentIDForModeration_Call) RunAndReturn

type MockCommentRepository_GetByContentID_Call

type MockCommentRepository_GetByContentID_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_GetByContentID_Call) Return

func (_c *MockCommentRepository_GetByContentID_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByContentID_Call

func (*MockCommentRepository_GetByContentID_Call) Run

func (*MockCommentRepository_GetByContentID_Call) RunAndReturn

func (_c *MockCommentRepository_GetByContentID_Call) RunAndReturn(run func(ctx context.Context, contentID int) ([]*comments.Comment, error)) *MockCommentRepository_GetByContentID_Call

type MockCommentRepository_GetByID_Call

type MockCommentRepository_GetByID_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_GetByID_Call) Return

func (_c *MockCommentRepository_GetByID_Call) Return(comment *comments.Comment, err error) *MockCommentRepository_GetByID_Call

func (*MockCommentRepository_GetByID_Call) Run

func (*MockCommentRepository_GetByID_Call) RunAndReturn

func (_c *MockCommentRepository_GetByID_Call) RunAndReturn(run func(ctx context.Context, id int) (*comments.Comment, error)) *MockCommentRepository_GetByID_Call

type MockCommentRepository_GetByStatus_Call

type MockCommentRepository_GetByStatus_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_GetByStatus_Call) Return

func (_c *MockCommentRepository_GetByStatus_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByStatus_Call

func (*MockCommentRepository_GetByStatus_Call) Run

func (_c *MockCommentRepository_GetByStatus_Call) Run(run func(ctx context.Context, status comments.CommentStatus)) *MockCommentRepository_GetByStatus_Call

func (*MockCommentRepository_GetByStatus_Call) RunAndReturn

func (_c *MockCommentRepository_GetByStatus_Call) RunAndReturn(run func(ctx context.Context, status comments.CommentStatus) ([]*comments.Comment, error)) *MockCommentRepository_GetByStatus_Call

type MockCommentRepository_GetByUserID_Call

type MockCommentRepository_GetByUserID_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_GetByUserID_Call) Return

func (_c *MockCommentRepository_GetByUserID_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByUserID_Call

func (*MockCommentRepository_GetByUserID_Call) Run

func (*MockCommentRepository_GetByUserID_Call) RunAndReturn

func (_c *MockCommentRepository_GetByUserID_Call) RunAndReturn(run func(ctx context.Context, userID int) ([]*comments.Comment, error)) *MockCommentRepository_GetByUserID_Call

type MockCommentRepository_UpdateStatus_Call

type MockCommentRepository_UpdateStatus_Call struct {
	*mock.Call
}

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

func (*MockCommentRepository_UpdateStatus_Call) Return

func (*MockCommentRepository_UpdateStatus_Call) Run

func (_c *MockCommentRepository_UpdateStatus_Call) Run(run func(ctx context.Context, id int, status comments.CommentStatus)) *MockCommentRepository_UpdateStatus_Call

func (*MockCommentRepository_UpdateStatus_Call) RunAndReturn

func (_c *MockCommentRepository_UpdateStatus_Call) RunAndReturn(run func(ctx context.Context, id int, status comments.CommentStatus) error) *MockCommentRepository_UpdateStatus_Call

Jump to

Keyboard shortcuts

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