Documentation
¶
Index ¶
- type MockMailer
- type MockMailer_Expecter
- type MockMailer_SendLowStockAlert_Call
- type MockProductStore
- func (_mock *MockProductStore) AdjustStock(ctx context.Context, contentID int, variantID *int64, delta int) (bool, error)
- func (_m *MockProductStore) EXPECT() *MockProductStore_Expecter
- func (_mock *MockProductStore) GetProduct(ctx context.Context, contentID int) (*catalog.Product, error)
- func (_mock *MockProductStore) UpsertProduct(ctx context.Context, contentID int, product *catalog.Product) error
- type MockProductStore_AdjustStock_Call
- func (_c *MockProductStore_AdjustStock_Call) Return(b bool, err error) *MockProductStore_AdjustStock_Call
- func (_c *MockProductStore_AdjustStock_Call) Run(run func(ctx context.Context, contentID int, variantID *int64, delta int)) *MockProductStore_AdjustStock_Call
- func (_c *MockProductStore_AdjustStock_Call) RunAndReturn(...) *MockProductStore_AdjustStock_Call
- type MockProductStore_Expecter
- func (_e *MockProductStore_Expecter) AdjustStock(ctx any, contentID any, variantID any, delta any) *MockProductStore_AdjustStock_Call
- func (_e *MockProductStore_Expecter) GetProduct(ctx any, contentID any) *MockProductStore_GetProduct_Call
- func (_e *MockProductStore_Expecter) UpsertProduct(ctx any, contentID any, product any) *MockProductStore_UpsertProduct_Call
- type MockProductStore_GetProduct_Call
- func (_c *MockProductStore_GetProduct_Call) Return(product *catalog.Product, err error) *MockProductStore_GetProduct_Call
- func (_c *MockProductStore_GetProduct_Call) Run(run func(ctx context.Context, contentID int)) *MockProductStore_GetProduct_Call
- func (_c *MockProductStore_GetProduct_Call) RunAndReturn(run func(ctx context.Context, contentID int) (*catalog.Product, error)) *MockProductStore_GetProduct_Call
- type MockProductStore_UpsertProduct_Call
- func (_c *MockProductStore_UpsertProduct_Call) Return(err error) *MockProductStore_UpsertProduct_Call
- func (_c *MockProductStore_UpsertProduct_Call) Run(run func(ctx context.Context, contentID int, product *catalog.Product)) *MockProductStore_UpsertProduct_Call
- func (_c *MockProductStore_UpsertProduct_Call) RunAndReturn(run func(ctx context.Context, contentID int, product *catalog.Product) error) *MockProductStore_UpsertProduct_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockMailer ¶
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 ¶
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 (_c *MockMailer_SendLowStockAlert_Call) Return(err error) *MockMailer_SendLowStockAlert_Call
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 ¶
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 (_m *MockProductStore) EXPECT() *MockProductStore_Expecter
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 ¶
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 (_c *MockProductStore_AdjustStock_Call) Return(b bool, err error) *MockProductStore_AdjustStock_Call
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 ¶
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 (_c *MockProductStore_GetProduct_Call) Run(run func(ctx context.Context, contentID int)) *MockProductStore_GetProduct_Call
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 ¶
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 (_c *MockProductStore_UpsertProduct_Call) Return(err error) *MockProductStore_UpsertProduct_Call
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