mocks

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 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 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) SendLowStockAlert

func (_mock *MockMailer) SendLowStockAlert(ctx context.Context, product *catalog.Product, variantID *int64, stock int) error

SendLowStockAlert provides a mock function for the type MockMailer

type MockMailer_Expecter

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

func (*MockMailer_Expecter) SendLowStockAlert

func (_e *MockMailer_Expecter) SendLowStockAlert(ctx any, product any, variantID any, stock any) *MockMailer_SendLowStockAlert_Call

SendLowStockAlert is a helper method to define mock.On call

  • ctx context.Context
  • product *catalog.Product
  • variantID *int64
  • stock int

type MockMailer_SendLowStockAlert_Call

type MockMailer_SendLowStockAlert_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendLowStockAlert_Call) Return

func (*MockMailer_SendLowStockAlert_Call) Run

func (_c *MockMailer_SendLowStockAlert_Call) Run(run func(ctx context.Context, product *catalog.Product, variantID *int64, stock int)) *MockMailer_SendLowStockAlert_Call

func (*MockMailer_SendLowStockAlert_Call) RunAndReturn

func (_c *MockMailer_SendLowStockAlert_Call) RunAndReturn(run func(ctx context.Context, product *catalog.Product, variantID *int64, stock int) error) *MockMailer_SendLowStockAlert_Call

type MockProductStore

type MockProductStore struct {
	mock.Mock
}

MockProductStore is an autogenerated mock type for the ProductStore type

func NewMockProductStore

func NewMockProductStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProductStore

NewMockProductStore creates a new instance of MockProductStore. 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 (*MockProductStore) AdjustStock

func (_mock *MockProductStore) AdjustStock(ctx context.Context, contentID int, variantID *int64, delta int) (bool, error)

AdjustStock provides a mock function for the type MockProductStore

func (*MockProductStore) EXPECT

func (*MockProductStore) GetProduct

func (_mock *MockProductStore) GetProduct(ctx context.Context, contentID int) (*catalog.Product, error)

GetProduct provides a mock function for the type MockProductStore

func (*MockProductStore) UpsertProduct

func (_mock *MockProductStore) UpsertProduct(ctx context.Context, contentID int, product *catalog.Product) error

UpsertProduct provides a mock function for the type MockProductStore

type MockProductStore_AdjustStock_Call

type MockProductStore_AdjustStock_Call struct {
	*mock.Call
}

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

func (*MockProductStore_AdjustStock_Call) Return

func (*MockProductStore_AdjustStock_Call) Run

func (_c *MockProductStore_AdjustStock_Call) Run(run func(ctx context.Context, contentID int, variantID *int64, delta int)) *MockProductStore_AdjustStock_Call

func (*MockProductStore_AdjustStock_Call) RunAndReturn

func (_c *MockProductStore_AdjustStock_Call) RunAndReturn(run func(ctx context.Context, contentID int, variantID *int64, delta int) (bool, error)) *MockProductStore_AdjustStock_Call

type MockProductStore_Expecter

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

func (*MockProductStore_Expecter) AdjustStock

func (_e *MockProductStore_Expecter) AdjustStock(ctx any, contentID any, variantID any, delta any) *MockProductStore_AdjustStock_Call

AdjustStock is a helper method to define mock.On call

  • ctx context.Context
  • contentID int
  • variantID *int64
  • delta int

func (*MockProductStore_Expecter) GetProduct

func (_e *MockProductStore_Expecter) GetProduct(ctx any, contentID any) *MockProductStore_GetProduct_Call

GetProduct is a helper method to define mock.On call

  • ctx context.Context
  • contentID int

func (*MockProductStore_Expecter) UpsertProduct

func (_e *MockProductStore_Expecter) UpsertProduct(ctx any, contentID any, product any) *MockProductStore_UpsertProduct_Call

UpsertProduct is a helper method to define mock.On call

  • ctx context.Context
  • contentID int
  • product *catalog.Product

type MockProductStore_GetProduct_Call

type MockProductStore_GetProduct_Call struct {
	*mock.Call
}

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

func (*MockProductStore_GetProduct_Call) Return

func (_c *MockProductStore_GetProduct_Call) Return(product *catalog.Product, err error) *MockProductStore_GetProduct_Call

func (*MockProductStore_GetProduct_Call) Run

func (*MockProductStore_GetProduct_Call) RunAndReturn

func (_c *MockProductStore_GetProduct_Call) RunAndReturn(run func(ctx context.Context, contentID int) (*catalog.Product, error)) *MockProductStore_GetProduct_Call

type MockProductStore_UpsertProduct_Call

type MockProductStore_UpsertProduct_Call struct {
	*mock.Call
}

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

func (*MockProductStore_UpsertProduct_Call) Return

func (*MockProductStore_UpsertProduct_Call) Run

func (_c *MockProductStore_UpsertProduct_Call) Run(run func(ctx context.Context, contentID int, product *catalog.Product)) *MockProductStore_UpsertProduct_Call

func (*MockProductStore_UpsertProduct_Call) RunAndReturn

func (_c *MockProductStore_UpsertProduct_Call) RunAndReturn(run func(ctx context.Context, contentID int, product *catalog.Product) error) *MockProductStore_UpsertProduct_Call

Jump to

Keyboard shortcuts

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