Documentation
¶
Index ¶
- type MockCommentRepository
- func (_mock *MockCommentRepository) Count(ctx context.Context, userID int) (int, error)
- func (_mock *MockCommentRepository) Create(ctx context.Context, comment *comments.Comment) error
- func (_mock *MockCommentRepository) Delete(ctx context.Context, id int) error
- func (_mock *MockCommentRepository) DeleteByUserID(ctx context.Context, userID int) error
- func (_m *MockCommentRepository) EXPECT() *MockCommentRepository_Expecter
- func (_mock *MockCommentRepository) GetByContentID(ctx context.Context, contentID int) ([]*comments.Comment, error)
- func (_mock *MockCommentRepository) GetByContentIDForModeration(ctx context.Context, contentID int) ([]*comments.Comment, error)
- func (_mock *MockCommentRepository) GetByID(ctx context.Context, id int) (*comments.Comment, error)
- func (_mock *MockCommentRepository) GetByStatus(ctx context.Context, status comments.CommentStatus) ([]*comments.Comment, error)
- func (_mock *MockCommentRepository) GetByUserID(ctx context.Context, userID int) ([]*comments.Comment, error)
- func (_mock *MockCommentRepository) UpdateStatus(ctx context.Context, id int, status comments.CommentStatus) error
- type MockCommentRepository_Count_Call
- func (_c *MockCommentRepository_Count_Call) Return(n int, err error) *MockCommentRepository_Count_Call
- func (_c *MockCommentRepository_Count_Call) Run(run func(ctx context.Context, userID int)) *MockCommentRepository_Count_Call
- func (_c *MockCommentRepository_Count_Call) RunAndReturn(run func(ctx context.Context, userID int) (int, error)) *MockCommentRepository_Count_Call
- type MockCommentRepository_Create_Call
- func (_c *MockCommentRepository_Create_Call) Return(err error) *MockCommentRepository_Create_Call
- func (_c *MockCommentRepository_Create_Call) Run(run func(ctx context.Context, comment *comments.Comment)) *MockCommentRepository_Create_Call
- func (_c *MockCommentRepository_Create_Call) RunAndReturn(run func(ctx context.Context, comment *comments.Comment) error) *MockCommentRepository_Create_Call
- type MockCommentRepository_DeleteByUserID_Call
- func (_c *MockCommentRepository_DeleteByUserID_Call) Return(err error) *MockCommentRepository_DeleteByUserID_Call
- func (_c *MockCommentRepository_DeleteByUserID_Call) Run(run func(ctx context.Context, userID int)) *MockCommentRepository_DeleteByUserID_Call
- func (_c *MockCommentRepository_DeleteByUserID_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockCommentRepository_DeleteByUserID_Call
- type MockCommentRepository_Delete_Call
- func (_c *MockCommentRepository_Delete_Call) Return(err error) *MockCommentRepository_Delete_Call
- func (_c *MockCommentRepository_Delete_Call) Run(run func(ctx context.Context, id int)) *MockCommentRepository_Delete_Call
- func (_c *MockCommentRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id int) error) *MockCommentRepository_Delete_Call
- type MockCommentRepository_Expecter
- func (_e *MockCommentRepository_Expecter) Count(ctx any, userID any) *MockCommentRepository_Count_Call
- func (_e *MockCommentRepository_Expecter) Create(ctx any, comment any) *MockCommentRepository_Create_Call
- func (_e *MockCommentRepository_Expecter) Delete(ctx any, id any) *MockCommentRepository_Delete_Call
- func (_e *MockCommentRepository_Expecter) DeleteByUserID(ctx any, userID any) *MockCommentRepository_DeleteByUserID_Call
- func (_e *MockCommentRepository_Expecter) GetByContentID(ctx any, contentID any) *MockCommentRepository_GetByContentID_Call
- func (_e *MockCommentRepository_Expecter) GetByContentIDForModeration(ctx any, contentID any) *MockCommentRepository_GetByContentIDForModeration_Call
- func (_e *MockCommentRepository_Expecter) GetByID(ctx any, id any) *MockCommentRepository_GetByID_Call
- func (_e *MockCommentRepository_Expecter) GetByStatus(ctx any, status any) *MockCommentRepository_GetByStatus_Call
- func (_e *MockCommentRepository_Expecter) GetByUserID(ctx any, userID any) *MockCommentRepository_GetByUserID_Call
- func (_e *MockCommentRepository_Expecter) UpdateStatus(ctx any, id any, status any) *MockCommentRepository_UpdateStatus_Call
- type MockCommentRepository_GetByContentIDForModeration_Call
- func (_c *MockCommentRepository_GetByContentIDForModeration_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByContentIDForModeration_Call
- func (_c *MockCommentRepository_GetByContentIDForModeration_Call) Run(run func(ctx context.Context, contentID int)) *MockCommentRepository_GetByContentIDForModeration_Call
- func (_c *MockCommentRepository_GetByContentIDForModeration_Call) RunAndReturn(run func(ctx context.Context, contentID int) ([]*comments.Comment, error)) *MockCommentRepository_GetByContentIDForModeration_Call
- type MockCommentRepository_GetByContentID_Call
- func (_c *MockCommentRepository_GetByContentID_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByContentID_Call
- func (_c *MockCommentRepository_GetByContentID_Call) Run(run func(ctx context.Context, contentID int)) *MockCommentRepository_GetByContentID_Call
- func (_c *MockCommentRepository_GetByContentID_Call) RunAndReturn(run func(ctx context.Context, contentID int) ([]*comments.Comment, error)) *MockCommentRepository_GetByContentID_Call
- type MockCommentRepository_GetByID_Call
- func (_c *MockCommentRepository_GetByID_Call) Return(comment *comments.Comment, err error) *MockCommentRepository_GetByID_Call
- func (_c *MockCommentRepository_GetByID_Call) Run(run func(ctx context.Context, id int)) *MockCommentRepository_GetByID_Call
- func (_c *MockCommentRepository_GetByID_Call) RunAndReturn(run func(ctx context.Context, id int) (*comments.Comment, error)) *MockCommentRepository_GetByID_Call
- type MockCommentRepository_GetByStatus_Call
- func (_c *MockCommentRepository_GetByStatus_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByStatus_Call
- func (_c *MockCommentRepository_GetByStatus_Call) Run(run func(ctx context.Context, status comments.CommentStatus)) *MockCommentRepository_GetByStatus_Call
- func (_c *MockCommentRepository_GetByStatus_Call) RunAndReturn(...) *MockCommentRepository_GetByStatus_Call
- type MockCommentRepository_GetByUserID_Call
- func (_c *MockCommentRepository_GetByUserID_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByUserID_Call
- func (_c *MockCommentRepository_GetByUserID_Call) Run(run func(ctx context.Context, userID int)) *MockCommentRepository_GetByUserID_Call
- func (_c *MockCommentRepository_GetByUserID_Call) RunAndReturn(run func(ctx context.Context, userID int) ([]*comments.Comment, error)) *MockCommentRepository_GetByUserID_Call
- type MockCommentRepository_UpdateStatus_Call
- func (_c *MockCommentRepository_UpdateStatus_Call) Return(err error) *MockCommentRepository_UpdateStatus_Call
- func (_c *MockCommentRepository_UpdateStatus_Call) Run(run func(ctx context.Context, id int, status comments.CommentStatus)) *MockCommentRepository_UpdateStatus_Call
- func (_c *MockCommentRepository_UpdateStatus_Call) RunAndReturn(run func(ctx context.Context, id int, status comments.CommentStatus) error) *MockCommentRepository_UpdateStatus_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCommentRepository ¶
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 ¶
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 (_m *MockCommentRepository) EXPECT() *MockCommentRepository_Expecter
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 ¶
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 (_c *MockCommentRepository_Count_Call) Return(n int, err error) *MockCommentRepository_Count_Call
func (*MockCommentRepository_Count_Call) Run ¶
func (_c *MockCommentRepository_Count_Call) Run(run func(ctx context.Context, userID int)) *MockCommentRepository_Count_Call
func (*MockCommentRepository_Count_Call) RunAndReturn ¶
func (_c *MockCommentRepository_Count_Call) RunAndReturn(run func(ctx context.Context, userID int) (int, error)) *MockCommentRepository_Count_Call
type MockCommentRepository_Create_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 (_c *MockCommentRepository_Create_Call) Return(err error) *MockCommentRepository_Create_Call
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 ¶
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 (_c *MockCommentRepository_DeleteByUserID_Call) Return(err error) *MockCommentRepository_DeleteByUserID_Call
func (*MockCommentRepository_DeleteByUserID_Call) Run ¶
func (_c *MockCommentRepository_DeleteByUserID_Call) Run(run func(ctx context.Context, userID int)) *MockCommentRepository_DeleteByUserID_Call
func (*MockCommentRepository_DeleteByUserID_Call) RunAndReturn ¶
func (_c *MockCommentRepository_DeleteByUserID_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockCommentRepository_DeleteByUserID_Call
type MockCommentRepository_Delete_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 (_c *MockCommentRepository_Delete_Call) Return(err error) *MockCommentRepository_Delete_Call
func (*MockCommentRepository_Delete_Call) Run ¶
func (_c *MockCommentRepository_Delete_Call) Run(run func(ctx context.Context, id int)) *MockCommentRepository_Delete_Call
func (*MockCommentRepository_Delete_Call) RunAndReturn ¶
func (_c *MockCommentRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, id int) error) *MockCommentRepository_Delete_Call
type MockCommentRepository_Expecter ¶
type MockCommentRepository_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCommentRepository_Expecter) Count ¶
func (_e *MockCommentRepository_Expecter) Count(ctx any, userID any) *MockCommentRepository_Count_Call
Count is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockCommentRepository_Expecter) Create ¶
func (_e *MockCommentRepository_Expecter) Create(ctx any, comment any) *MockCommentRepository_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- comment *comments.Comment
func (*MockCommentRepository_Expecter) Delete ¶
func (_e *MockCommentRepository_Expecter) Delete(ctx any, id any) *MockCommentRepository_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- id int
func (*MockCommentRepository_Expecter) DeleteByUserID ¶
func (_e *MockCommentRepository_Expecter) DeleteByUserID(ctx any, userID any) *MockCommentRepository_DeleteByUserID_Call
DeleteByUserID is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockCommentRepository_Expecter) GetByContentID ¶
func (_e *MockCommentRepository_Expecter) GetByContentID(ctx any, contentID any) *MockCommentRepository_GetByContentID_Call
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 ¶
func (_e *MockCommentRepository_Expecter) GetByID(ctx any, id any) *MockCommentRepository_GetByID_Call
GetByID is a helper method to define mock.On call
- ctx context.Context
- id int
func (*MockCommentRepository_Expecter) GetByStatus ¶
func (_e *MockCommentRepository_Expecter) GetByStatus(ctx any, status any) *MockCommentRepository_GetByStatus_Call
GetByStatus is a helper method to define mock.On call
- ctx context.Context
- status comments.CommentStatus
func (*MockCommentRepository_Expecter) GetByUserID ¶
func (_e *MockCommentRepository_Expecter) GetByUserID(ctx any, userID any) *MockCommentRepository_GetByUserID_Call
GetByUserID is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockCommentRepository_Expecter) UpdateStatus ¶
func (_e *MockCommentRepository_Expecter) UpdateStatus(ctx any, id any, status any) *MockCommentRepository_UpdateStatus_Call
UpdateStatus is a helper method to define mock.On call
- ctx context.Context
- id int
- status comments.CommentStatus
type MockCommentRepository_GetByContentIDForModeration_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 (_c *MockCommentRepository_GetByContentIDForModeration_Call) Return(comments1 []*comments.Comment, err error) *MockCommentRepository_GetByContentIDForModeration_Call
func (*MockCommentRepository_GetByContentIDForModeration_Call) Run ¶
func (_c *MockCommentRepository_GetByContentIDForModeration_Call) Run(run func(ctx context.Context, contentID int)) *MockCommentRepository_GetByContentIDForModeration_Call
func (*MockCommentRepository_GetByContentIDForModeration_Call) RunAndReturn ¶
func (_c *MockCommentRepository_GetByContentIDForModeration_Call) RunAndReturn(run func(ctx context.Context, contentID int) ([]*comments.Comment, error)) *MockCommentRepository_GetByContentIDForModeration_Call
type MockCommentRepository_GetByContentID_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 (_c *MockCommentRepository_GetByContentID_Call) Run(run func(ctx context.Context, contentID int)) *MockCommentRepository_GetByContentID_Call
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 ¶
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 (_c *MockCommentRepository_GetByID_Call) Run(run func(ctx context.Context, id int)) *MockCommentRepository_GetByID_Call
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 ¶
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 ¶
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 (_c *MockCommentRepository_GetByUserID_Call) Run(run func(ctx context.Context, userID int)) *MockCommentRepository_GetByUserID_Call
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 ¶
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 (_c *MockCommentRepository_UpdateStatus_Call) Return(err error) *MockCommentRepository_UpdateStatus_Call
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