mocks

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 3 Imported by: ? 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 MockReactionService

type MockReactionService struct {
	mock.Mock
}

MockReactionService is an autogenerated mock type for the ReactionService type

func NewMockReactionService

func NewMockReactionService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReactionService

NewMockReactionService creates a new instance of MockReactionService. 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 (*MockReactionService) Clap

func (_mock *MockReactionService) Clap(ctx context.Context, contentID int, userID int, count int) (*reactions.Summary, error)

Clap provides a mock function for the type MockReactionService

func (*MockReactionService) EXPECT

func (*MockReactionService) GetSummary

func (_mock *MockReactionService) GetSummary(ctx context.Context, contentID int, viewerUserID int) (*reactions.Summary, error)

GetSummary provides a mock function for the type MockReactionService

func (*MockReactionService) ListReadLater

func (_mock *MockReactionService) ListReadLater(ctx context.Context, userID int, afterTime int64, afterContentID int, limit int) ([]reactions.MarkedItem, reactions.ReadLaterKey, bool, error)

ListReadLater provides a mock function for the type MockReactionService

func (*MockReactionService) SetReadLater

func (_mock *MockReactionService) SetReadLater(ctx context.Context, contentID int, userID int, marked bool) (*reactions.Summary, error)

SetReadLater provides a mock function for the type MockReactionService

type MockReactionService_Clap_Call

type MockReactionService_Clap_Call struct {
	*mock.Call
}

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

func (*MockReactionService_Clap_Call) Return

func (_c *MockReactionService_Clap_Call) Return(summary *reactions.Summary, err error) *MockReactionService_Clap_Call

func (*MockReactionService_Clap_Call) Run

func (_c *MockReactionService_Clap_Call) Run(run func(ctx context.Context, contentID int, userID int, count int)) *MockReactionService_Clap_Call

func (*MockReactionService_Clap_Call) RunAndReturn

func (_c *MockReactionService_Clap_Call) RunAndReturn(run func(ctx context.Context, contentID int, userID int, count int) (*reactions.Summary, error)) *MockReactionService_Clap_Call

type MockReactionService_Expecter

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

func (*MockReactionService_Expecter) Clap

func (_e *MockReactionService_Expecter) Clap(ctx any, contentID any, userID any, count any) *MockReactionService_Clap_Call

Clap is a helper method to define mock.On call

  • ctx context.Context
  • contentID int
  • userID int
  • count int

func (*MockReactionService_Expecter) GetSummary

func (_e *MockReactionService_Expecter) GetSummary(ctx any, contentID any, viewerUserID any) *MockReactionService_GetSummary_Call

GetSummary is a helper method to define mock.On call

  • ctx context.Context
  • contentID int
  • viewerUserID int

func (*MockReactionService_Expecter) ListReadLater

func (_e *MockReactionService_Expecter) ListReadLater(ctx any, userID any, afterTime any, afterContentID any, limit any) *MockReactionService_ListReadLater_Call

ListReadLater is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • afterTime int64
  • afterContentID int
  • limit int

func (*MockReactionService_Expecter) SetReadLater

func (_e *MockReactionService_Expecter) SetReadLater(ctx any, contentID any, userID any, marked any) *MockReactionService_SetReadLater_Call

SetReadLater is a helper method to define mock.On call

  • ctx context.Context
  • contentID int
  • userID int
  • marked bool

type MockReactionService_GetSummary_Call

type MockReactionService_GetSummary_Call struct {
	*mock.Call
}

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

func (*MockReactionService_GetSummary_Call) Return

func (_c *MockReactionService_GetSummary_Call) Return(summary *reactions.Summary, err error) *MockReactionService_GetSummary_Call

func (*MockReactionService_GetSummary_Call) Run

func (_c *MockReactionService_GetSummary_Call) Run(run func(ctx context.Context, contentID int, viewerUserID int)) *MockReactionService_GetSummary_Call

func (*MockReactionService_GetSummary_Call) RunAndReturn

func (_c *MockReactionService_GetSummary_Call) RunAndReturn(run func(ctx context.Context, contentID int, viewerUserID int) (*reactions.Summary, error)) *MockReactionService_GetSummary_Call

type MockReactionService_ListReadLater_Call

type MockReactionService_ListReadLater_Call struct {
	*mock.Call
}

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

func (*MockReactionService_ListReadLater_Call) Return

func (_c *MockReactionService_ListReadLater_Call) Return(markedItems []reactions.MarkedItem, readLaterKey reactions.ReadLaterKey, b bool, err error) *MockReactionService_ListReadLater_Call

func (*MockReactionService_ListReadLater_Call) Run

func (_c *MockReactionService_ListReadLater_Call) Run(run func(ctx context.Context, userID int, afterTime int64, afterContentID int, limit int)) *MockReactionService_ListReadLater_Call

func (*MockReactionService_ListReadLater_Call) RunAndReturn

func (_c *MockReactionService_ListReadLater_Call) RunAndReturn(run func(ctx context.Context, userID int, afterTime int64, afterContentID int, limit int) ([]reactions.MarkedItem, reactions.ReadLaterKey, bool, error)) *MockReactionService_ListReadLater_Call

type MockReactionService_SetReadLater_Call

type MockReactionService_SetReadLater_Call struct {
	*mock.Call
}

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

func (*MockReactionService_SetReadLater_Call) Return

func (_c *MockReactionService_SetReadLater_Call) Return(summary *reactions.Summary, err error) *MockReactionService_SetReadLater_Call

func (*MockReactionService_SetReadLater_Call) Run

func (_c *MockReactionService_SetReadLater_Call) Run(run func(ctx context.Context, contentID int, userID int, marked bool)) *MockReactionService_SetReadLater_Call

func (*MockReactionService_SetReadLater_Call) RunAndReturn

func (_c *MockReactionService_SetReadLater_Call) RunAndReturn(run func(ctx context.Context, contentID int, userID int, marked bool) (*reactions.Summary, error)) *MockReactionService_SetReadLater_Call

Jump to

Keyboard shortcuts

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