mocks

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 4 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 MockCommentService

type MockCommentService struct {
	mock.Mock
}

MockCommentService is an autogenerated mock type for the CommentService type

func NewMockCommentService

func NewMockCommentService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCommentService

NewMockCommentService creates a new instance of MockCommentService. 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 (*MockCommentService) DeleteComment

func (_mock *MockCommentService) DeleteComment(ctx context.Context, commentID int) error

DeleteComment provides a mock function for the type MockCommentService

func (*MockCommentService) DeleteOwnComment

func (_mock *MockCommentService) DeleteOwnComment(ctx context.Context, commentID int, principal kernel.Principal) error

DeleteOwnComment provides a mock function for the type MockCommentService

func (*MockCommentService) EXPECT

func (*MockCommentService) GetComment

func (_mock *MockCommentService) GetComment(ctx context.Context, commentID int) (*comments.Comment, error)

GetComment provides a mock function for the type MockCommentService

func (*MockCommentService) GetCommentsForContent

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

GetCommentsForContent provides a mock function for the type MockCommentService

func (*MockCommentService) GetCommentsForModeration

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

GetCommentsForModeration provides a mock function for the type MockCommentService

func (*MockCommentService) SubmitComment

func (_mock *MockCommentService) SubmitComment(ctx context.Context, contentID int, principal kernel.Principal, req comments.CreateCommentRequest) (*comments.Comment, error)

SubmitComment provides a mock function for the type MockCommentService

func (*MockCommentService) UpdateCommentStatus

func (_mock *MockCommentService) UpdateCommentStatus(ctx context.Context, commentID int, status comments.CommentStatus) error

UpdateCommentStatus provides a mock function for the type MockCommentService

type MockCommentService_DeleteComment_Call

type MockCommentService_DeleteComment_Call struct {
	*mock.Call
}

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

func (*MockCommentService_DeleteComment_Call) Return

func (*MockCommentService_DeleteComment_Call) Run

func (*MockCommentService_DeleteComment_Call) RunAndReturn

type MockCommentService_DeleteOwnComment_Call

type MockCommentService_DeleteOwnComment_Call struct {
	*mock.Call
}

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

func (*MockCommentService_DeleteOwnComment_Call) Return

func (*MockCommentService_DeleteOwnComment_Call) Run

func (*MockCommentService_DeleteOwnComment_Call) RunAndReturn

type MockCommentService_Expecter

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

func (*MockCommentService_Expecter) DeleteComment

func (_e *MockCommentService_Expecter) DeleteComment(ctx any, commentID any) *MockCommentService_DeleteComment_Call

DeleteComment is a helper method to define mock.On call

  • ctx context.Context
  • commentID int

func (*MockCommentService_Expecter) DeleteOwnComment

func (_e *MockCommentService_Expecter) DeleteOwnComment(ctx any, commentID any, principal any) *MockCommentService_DeleteOwnComment_Call

DeleteOwnComment is a helper method to define mock.On call

  • ctx context.Context
  • commentID int
  • principal kernel.Principal

func (*MockCommentService_Expecter) GetComment

GetComment is a helper method to define mock.On call

  • ctx context.Context
  • commentID int

func (*MockCommentService_Expecter) GetCommentsForContent

func (_e *MockCommentService_Expecter) GetCommentsForContent(ctx any, contentID any) *MockCommentService_GetCommentsForContent_Call

GetCommentsForContent is a helper method to define mock.On call

  • ctx context.Context
  • contentID int

func (*MockCommentService_Expecter) GetCommentsForModeration

func (_e *MockCommentService_Expecter) GetCommentsForModeration(ctx any, contentID any) *MockCommentService_GetCommentsForModeration_Call

GetCommentsForModeration is a helper method to define mock.On call

  • ctx context.Context
  • contentID int

func (*MockCommentService_Expecter) SubmitComment

func (_e *MockCommentService_Expecter) SubmitComment(ctx any, contentID any, principal any, req any) *MockCommentService_SubmitComment_Call

SubmitComment is a helper method to define mock.On call

  • ctx context.Context
  • contentID int
  • principal kernel.Principal
  • req comments.CreateCommentRequest

func (*MockCommentService_Expecter) UpdateCommentStatus

func (_e *MockCommentService_Expecter) UpdateCommentStatus(ctx any, commentID any, status any) *MockCommentService_UpdateCommentStatus_Call

UpdateCommentStatus is a helper method to define mock.On call

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

type MockCommentService_GetComment_Call

type MockCommentService_GetComment_Call struct {
	*mock.Call
}

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

func (*MockCommentService_GetComment_Call) Return

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

func (*MockCommentService_GetComment_Call) Run

func (*MockCommentService_GetComment_Call) RunAndReturn

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

type MockCommentService_GetCommentsForContent_Call

type MockCommentService_GetCommentsForContent_Call struct {
	*mock.Call
}

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

func (*MockCommentService_GetCommentsForContent_Call) Return

func (*MockCommentService_GetCommentsForContent_Call) Run

func (*MockCommentService_GetCommentsForContent_Call) RunAndReturn

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

type MockCommentService_GetCommentsForModeration_Call

type MockCommentService_GetCommentsForModeration_Call struct {
	*mock.Call
}

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

func (*MockCommentService_GetCommentsForModeration_Call) Return

func (*MockCommentService_GetCommentsForModeration_Call) Run

func (*MockCommentService_GetCommentsForModeration_Call) RunAndReturn

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

type MockCommentService_SubmitComment_Call

type MockCommentService_SubmitComment_Call struct {
	*mock.Call
}

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

func (*MockCommentService_SubmitComment_Call) Return

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

func (*MockCommentService_SubmitComment_Call) Run

func (_c *MockCommentService_SubmitComment_Call) Run(run func(ctx context.Context, contentID int, principal kernel.Principal, req comments.CreateCommentRequest)) *MockCommentService_SubmitComment_Call

func (*MockCommentService_SubmitComment_Call) RunAndReturn

func (_c *MockCommentService_SubmitComment_Call) RunAndReturn(run func(ctx context.Context, contentID int, principal kernel.Principal, req comments.CreateCommentRequest) (*comments.Comment, error)) *MockCommentService_SubmitComment_Call

type MockCommentService_UpdateCommentStatus_Call

type MockCommentService_UpdateCommentStatus_Call struct {
	*mock.Call
}

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

func (*MockCommentService_UpdateCommentStatus_Call) Return

func (*MockCommentService_UpdateCommentStatus_Call) Run

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

func (*MockCommentService_UpdateCommentStatus_Call) RunAndReturn

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

type MockRoleCapabilities

type MockRoleCapabilities struct {
	mock.Mock
}

MockRoleCapabilities is an autogenerated mock type for the RoleCapabilities type

func NewMockRoleCapabilities

func NewMockRoleCapabilities(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRoleCapabilities

NewMockRoleCapabilities creates a new instance of MockRoleCapabilities. 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 (*MockRoleCapabilities) CanComment

func (_mock *MockRoleCapabilities) CanComment(name string) bool

CanComment provides a mock function for the type MockRoleCapabilities

func (*MockRoleCapabilities) EXPECT

type MockRoleCapabilities_CanComment_Call

type MockRoleCapabilities_CanComment_Call struct {
	*mock.Call
}

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

func (*MockRoleCapabilities_CanComment_Call) Return

func (*MockRoleCapabilities_CanComment_Call) Run

func (*MockRoleCapabilities_CanComment_Call) RunAndReturn

type MockRoleCapabilities_Expecter

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

func (*MockRoleCapabilities_Expecter) CanComment

CanComment is a helper method to define mock.On call

  • name string

Jump to

Keyboard shortcuts

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