Documentation
¶
Index ¶
- type AddCartItemLogic
- type Cart
- func (_m *Cart) AddItem(ctx context.Context, in *cart.AddItemRequest, opts ...grpc.CallOption) (*cart.AddItemResponse, error)
- func (_m *Cart) CheckStock(ctx context.Context, in *cart.CheckStockRequest, opts ...grpc.CallOption) (*cart.CheckStockResponse, error)
- func (_m *Cart) ClearCart(ctx context.Context, in *cart.ClearCartRequest, opts ...grpc.CallOption) (*cart.ClearCartResponse, error)
- func (_m *Cart) EXPECT() *Cart_Expecter
- func (_m *Cart) GetCart(ctx context.Context, in *cart.GetCartRequest, opts ...grpc.CallOption) (*cart.GetCartResponse, error)
- func (_m *Cart) GetSelectedItems(ctx context.Context, in *cart.GetSelectedItemsRequest, opts ...grpc.CallOption) (*cart.GetSelectedItemsResponse, error)
- func (_m *Cart) On(s string, param any, request *cart.GetSelectedItemsRequest)
- func (_m *Cart) RemoveItem(ctx context.Context, in *cart.RemoveItemRequest, opts ...grpc.CallOption) (*cart.RemoveItemResponse, error)
- func (_m *Cart) SelectAll(ctx context.Context, in *cart.SelectAllRequest, opts ...grpc.CallOption) (*cart.SelectAllResponse, error)
- func (_m *Cart) SelectItem(ctx context.Context, in *cart.SelectItemRequest, opts ...grpc.CallOption) (*cart.SelectItemResponse, error)
- func (_m *Cart) UnselectAll(ctx context.Context, in *cart.UnselectAllRequest, opts ...grpc.CallOption) (*cart.UnselectAllResponse, error)
- func (_m *Cart) UnselectItem(ctx context.Context, in *cart.UnselectItemRequest, opts ...grpc.CallOption) (*cart.UnselectItemResponse, error)
- func (_m *Cart) UpdateItem(ctx context.Context, in *cart.UpdateItemRequest, opts ...grpc.CallOption) (*cart.UpdateItemResponse, error)
- type Cart_AddItem_Call
- type Cart_CheckStock_Call
- type Cart_ClearCart_Call
- type Cart_Expecter
- func (_e *Cart_Expecter) AddItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_AddItem_Call
- func (_e *Cart_Expecter) CheckStock(ctx interface{}, in interface{}, opts ...interface{}) *Cart_CheckStock_Call
- func (_e *Cart_Expecter) ClearCart(ctx interface{}, in interface{}, opts ...interface{}) *Cart_ClearCart_Call
- func (_e *Cart_Expecter) GetCart(ctx interface{}, in interface{}, opts ...interface{}) *Cart_GetCart_Call
- func (_e *Cart_Expecter) GetSelectedItems(ctx interface{}, in interface{}, opts ...interface{}) *Cart_GetSelectedItems_Call
- func (_e *Cart_Expecter) RemoveItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_RemoveItem_Call
- func (_e *Cart_Expecter) SelectAll(ctx interface{}, in interface{}, opts ...interface{}) *Cart_SelectAll_Call
- func (_e *Cart_Expecter) SelectItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_SelectItem_Call
- func (_e *Cart_Expecter) UnselectAll(ctx interface{}, in interface{}, opts ...interface{}) *Cart_UnselectAll_Call
- func (_e *Cart_Expecter) UnselectItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_UnselectItem_Call
- func (_e *Cart_Expecter) UpdateItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_UpdateItem_Call
- type Cart_GetCart_Call
- type Cart_GetSelectedItems_Call
- type Cart_RemoveItem_Call
- type Cart_SelectAll_Call
- type Cart_SelectItem_Call
- type Cart_UnselectAll_Call
- type Cart_UnselectItem_Call
- type Cart_UpdateItem_Call
- type DeleteCartItemLogic
- type GetCartLogic
- type GetSelectedItemsLogic
- type SelectCartItemsLogic
- type UnselectCartItemsLogic
- type UpdateCartItemLogic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCartItemLogic ¶
func NewAddCartItemLogic ¶
func NewAddCartItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddCartItemLogic
func (*AddCartItemLogic) AddCartItem ¶
func (l *AddCartItemLogic) AddCartItem(req *types.CartItemReq) error
type Cart ¶
Cart is an autogenerated mock type for the Cart type
func NewCart ¶
NewCart creates a new instance of Cart. 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 (*Cart) AddItem ¶
func (_m *Cart) AddItem(ctx context.Context, in *cart.AddItemRequest, opts ...grpc.CallOption) (*cart.AddItemResponse, error)
AddItem provides a mock function with given fields: ctx, in, opts
func (*Cart) CheckStock ¶
func (_m *Cart) CheckStock(ctx context.Context, in *cart.CheckStockRequest, opts ...grpc.CallOption) (*cart.CheckStockResponse, error)
CheckStock provides a mock function with given fields: ctx, in, opts
func (*Cart) ClearCart ¶
func (_m *Cart) ClearCart(ctx context.Context, in *cart.ClearCartRequest, opts ...grpc.CallOption) (*cart.ClearCartResponse, error)
ClearCart provides a mock function with given fields: ctx, in, opts
func (*Cart) EXPECT ¶
func (_m *Cart) EXPECT() *Cart_Expecter
func (*Cart) GetCart ¶
func (_m *Cart) GetCart(ctx context.Context, in *cart.GetCartRequest, opts ...grpc.CallOption) (*cart.GetCartResponse, error)
GetCart provides a mock function with given fields: ctx, in, opts
func (*Cart) GetSelectedItems ¶
func (_m *Cart) GetSelectedItems(ctx context.Context, in *cart.GetSelectedItemsRequest, opts ...grpc.CallOption) (*cart.GetSelectedItemsResponse, error)
GetSelectedItems provides a mock function with given fields: ctx, in, opts
func (*Cart) RemoveItem ¶
func (_m *Cart) RemoveItem(ctx context.Context, in *cart.RemoveItemRequest, opts ...grpc.CallOption) (*cart.RemoveItemResponse, error)
RemoveItem provides a mock function with given fields: ctx, in, opts
func (*Cart) SelectAll ¶
func (_m *Cart) SelectAll(ctx context.Context, in *cart.SelectAllRequest, opts ...grpc.CallOption) (*cart.SelectAllResponse, error)
SelectAll provides a mock function with given fields: ctx, in, opts
func (*Cart) SelectItem ¶
func (_m *Cart) SelectItem(ctx context.Context, in *cart.SelectItemRequest, opts ...grpc.CallOption) (*cart.SelectItemResponse, error)
SelectItem provides a mock function with given fields: ctx, in, opts
func (*Cart) UnselectAll ¶
func (_m *Cart) UnselectAll(ctx context.Context, in *cart.UnselectAllRequest, opts ...grpc.CallOption) (*cart.UnselectAllResponse, error)
UnselectAll provides a mock function with given fields: ctx, in, opts
func (*Cart) UnselectItem ¶
func (_m *Cart) UnselectItem(ctx context.Context, in *cart.UnselectItemRequest, opts ...grpc.CallOption) (*cart.UnselectItemResponse, error)
UnselectItem provides a mock function with given fields: ctx, in, opts
func (*Cart) UpdateItem ¶
func (_m *Cart) UpdateItem(ctx context.Context, in *cart.UpdateItemRequest, opts ...grpc.CallOption) (*cart.UpdateItemResponse, error)
UpdateItem provides a mock function with given fields: ctx, in, opts
type Cart_AddItem_Call ¶
Cart_AddItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddItem'
func (*Cart_AddItem_Call) Return ¶
func (_c *Cart_AddItem_Call) Return(_a0 *cart.AddItemResponse, _a1 error) *Cart_AddItem_Call
func (*Cart_AddItem_Call) Run ¶
func (_c *Cart_AddItem_Call) Run(run func(ctx context.Context, in *cart.AddItemRequest, opts ...grpc.CallOption)) *Cart_AddItem_Call
func (*Cart_AddItem_Call) RunAndReturn ¶
func (_c *Cart_AddItem_Call) RunAndReturn(run func(context.Context, *cart.AddItemRequest, ...grpc.CallOption) (*cart.AddItemResponse, error)) *Cart_AddItem_Call
type Cart_CheckStock_Call ¶
Cart_CheckStock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckStock'
func (*Cart_CheckStock_Call) Return ¶
func (_c *Cart_CheckStock_Call) Return(_a0 *cart.CheckStockResponse, _a1 error) *Cart_CheckStock_Call
func (*Cart_CheckStock_Call) Run ¶
func (_c *Cart_CheckStock_Call) Run(run func(ctx context.Context, in *cart.CheckStockRequest, opts ...grpc.CallOption)) *Cart_CheckStock_Call
func (*Cart_CheckStock_Call) RunAndReturn ¶
func (_c *Cart_CheckStock_Call) RunAndReturn(run func(context.Context, *cart.CheckStockRequest, ...grpc.CallOption) (*cart.CheckStockResponse, error)) *Cart_CheckStock_Call
type Cart_ClearCart_Call ¶
Cart_ClearCart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearCart'
func (*Cart_ClearCart_Call) Return ¶
func (_c *Cart_ClearCart_Call) Return(_a0 *cart.ClearCartResponse, _a1 error) *Cart_ClearCart_Call
func (*Cart_ClearCart_Call) Run ¶
func (_c *Cart_ClearCart_Call) Run(run func(ctx context.Context, in *cart.ClearCartRequest, opts ...grpc.CallOption)) *Cart_ClearCart_Call
func (*Cart_ClearCart_Call) RunAndReturn ¶
func (_c *Cart_ClearCart_Call) RunAndReturn(run func(context.Context, *cart.ClearCartRequest, ...grpc.CallOption) (*cart.ClearCartResponse, error)) *Cart_ClearCart_Call
type Cart_Expecter ¶
type Cart_Expecter struct {
// contains filtered or unexported fields
}
func (*Cart_Expecter) AddItem ¶
func (_e *Cart_Expecter) AddItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_AddItem_Call
AddItem is a helper method to define mock.On call
- ctx context.Context
- in *cart.AddItemRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) CheckStock ¶
func (_e *Cart_Expecter) CheckStock(ctx interface{}, in interface{}, opts ...interface{}) *Cart_CheckStock_Call
CheckStock is a helper method to define mock.On call
- ctx context.Context
- in *cart.CheckStockRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) ClearCart ¶
func (_e *Cart_Expecter) ClearCart(ctx interface{}, in interface{}, opts ...interface{}) *Cart_ClearCart_Call
ClearCart is a helper method to define mock.On call
- ctx context.Context
- in *cart.ClearCartRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) GetCart ¶
func (_e *Cart_Expecter) GetCart(ctx interface{}, in interface{}, opts ...interface{}) *Cart_GetCart_Call
GetCart is a helper method to define mock.On call
- ctx context.Context
- in *cart.GetCartRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) GetSelectedItems ¶
func (_e *Cart_Expecter) GetSelectedItems(ctx interface{}, in interface{}, opts ...interface{}) *Cart_GetSelectedItems_Call
GetSelectedItems is a helper method to define mock.On call
- ctx context.Context
- in *cart.GetSelectedItemsRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) RemoveItem ¶
func (_e *Cart_Expecter) RemoveItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_RemoveItem_Call
RemoveItem is a helper method to define mock.On call
- ctx context.Context
- in *cart.RemoveItemRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) SelectAll ¶
func (_e *Cart_Expecter) SelectAll(ctx interface{}, in interface{}, opts ...interface{}) *Cart_SelectAll_Call
SelectAll is a helper method to define mock.On call
- ctx context.Context
- in *cart.SelectAllRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) SelectItem ¶
func (_e *Cart_Expecter) SelectItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_SelectItem_Call
SelectItem is a helper method to define mock.On call
- ctx context.Context
- in *cart.SelectItemRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) UnselectAll ¶
func (_e *Cart_Expecter) UnselectAll(ctx interface{}, in interface{}, opts ...interface{}) *Cart_UnselectAll_Call
UnselectAll is a helper method to define mock.On call
- ctx context.Context
- in *cart.UnselectAllRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) UnselectItem ¶
func (_e *Cart_Expecter) UnselectItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_UnselectItem_Call
UnselectItem is a helper method to define mock.On call
- ctx context.Context
- in *cart.UnselectItemRequest
- opts ...grpc.CallOption
func (*Cart_Expecter) UpdateItem ¶
func (_e *Cart_Expecter) UpdateItem(ctx interface{}, in interface{}, opts ...interface{}) *Cart_UpdateItem_Call
UpdateItem is a helper method to define mock.On call
- ctx context.Context
- in *cart.UpdateItemRequest
- opts ...grpc.CallOption
type Cart_GetCart_Call ¶
Cart_GetCart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCart'
func (*Cart_GetCart_Call) Return ¶
func (_c *Cart_GetCart_Call) Return(_a0 *cart.GetCartResponse, _a1 error) *Cart_GetCart_Call
func (*Cart_GetCart_Call) Run ¶
func (_c *Cart_GetCart_Call) Run(run func(ctx context.Context, in *cart.GetCartRequest, opts ...grpc.CallOption)) *Cart_GetCart_Call
func (*Cart_GetCart_Call) RunAndReturn ¶
func (_c *Cart_GetCart_Call) RunAndReturn(run func(context.Context, *cart.GetCartRequest, ...grpc.CallOption) (*cart.GetCartResponse, error)) *Cart_GetCart_Call
type Cart_GetSelectedItems_Call ¶
Cart_GetSelectedItems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSelectedItems'
func (*Cart_GetSelectedItems_Call) Return ¶
func (_c *Cart_GetSelectedItems_Call) Return(_a0 *cart.GetSelectedItemsResponse, _a1 error) *Cart_GetSelectedItems_Call
func (*Cart_GetSelectedItems_Call) Run ¶
func (_c *Cart_GetSelectedItems_Call) Run(run func(ctx context.Context, in *cart.GetSelectedItemsRequest, opts ...grpc.CallOption)) *Cart_GetSelectedItems_Call
func (*Cart_GetSelectedItems_Call) RunAndReturn ¶
func (_c *Cart_GetSelectedItems_Call) RunAndReturn(run func(context.Context, *cart.GetSelectedItemsRequest, ...grpc.CallOption) (*cart.GetSelectedItemsResponse, error)) *Cart_GetSelectedItems_Call
type Cart_RemoveItem_Call ¶
Cart_RemoveItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveItem'
func (*Cart_RemoveItem_Call) Return ¶
func (_c *Cart_RemoveItem_Call) Return(_a0 *cart.RemoveItemResponse, _a1 error) *Cart_RemoveItem_Call
func (*Cart_RemoveItem_Call) Run ¶
func (_c *Cart_RemoveItem_Call) Run(run func(ctx context.Context, in *cart.RemoveItemRequest, opts ...grpc.CallOption)) *Cart_RemoveItem_Call
func (*Cart_RemoveItem_Call) RunAndReturn ¶
func (_c *Cart_RemoveItem_Call) RunAndReturn(run func(context.Context, *cart.RemoveItemRequest, ...grpc.CallOption) (*cart.RemoveItemResponse, error)) *Cart_RemoveItem_Call
type Cart_SelectAll_Call ¶
Cart_SelectAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectAll'
func (*Cart_SelectAll_Call) Return ¶
func (_c *Cart_SelectAll_Call) Return(_a0 *cart.SelectAllResponse, _a1 error) *Cart_SelectAll_Call
func (*Cart_SelectAll_Call) Run ¶
func (_c *Cart_SelectAll_Call) Run(run func(ctx context.Context, in *cart.SelectAllRequest, opts ...grpc.CallOption)) *Cart_SelectAll_Call
func (*Cart_SelectAll_Call) RunAndReturn ¶
func (_c *Cart_SelectAll_Call) RunAndReturn(run func(context.Context, *cart.SelectAllRequest, ...grpc.CallOption) (*cart.SelectAllResponse, error)) *Cart_SelectAll_Call
type Cart_SelectItem_Call ¶
Cart_SelectItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectItem'
func (*Cart_SelectItem_Call) Return ¶
func (_c *Cart_SelectItem_Call) Return(_a0 *cart.SelectItemResponse, _a1 error) *Cart_SelectItem_Call
func (*Cart_SelectItem_Call) Run ¶
func (_c *Cart_SelectItem_Call) Run(run func(ctx context.Context, in *cart.SelectItemRequest, opts ...grpc.CallOption)) *Cart_SelectItem_Call
func (*Cart_SelectItem_Call) RunAndReturn ¶
func (_c *Cart_SelectItem_Call) RunAndReturn(run func(context.Context, *cart.SelectItemRequest, ...grpc.CallOption) (*cart.SelectItemResponse, error)) *Cart_SelectItem_Call
type Cart_UnselectAll_Call ¶
Cart_UnselectAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnselectAll'
func (*Cart_UnselectAll_Call) Return ¶
func (_c *Cart_UnselectAll_Call) Return(_a0 *cart.UnselectAllResponse, _a1 error) *Cart_UnselectAll_Call
func (*Cart_UnselectAll_Call) Run ¶
func (_c *Cart_UnselectAll_Call) Run(run func(ctx context.Context, in *cart.UnselectAllRequest, opts ...grpc.CallOption)) *Cart_UnselectAll_Call
func (*Cart_UnselectAll_Call) RunAndReturn ¶
func (_c *Cart_UnselectAll_Call) RunAndReturn(run func(context.Context, *cart.UnselectAllRequest, ...grpc.CallOption) (*cart.UnselectAllResponse, error)) *Cart_UnselectAll_Call
type Cart_UnselectItem_Call ¶
Cart_UnselectItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnselectItem'
func (*Cart_UnselectItem_Call) Return ¶
func (_c *Cart_UnselectItem_Call) Return(_a0 *cart.UnselectItemResponse, _a1 error) *Cart_UnselectItem_Call
func (*Cart_UnselectItem_Call) Run ¶
func (_c *Cart_UnselectItem_Call) Run(run func(ctx context.Context, in *cart.UnselectItemRequest, opts ...grpc.CallOption)) *Cart_UnselectItem_Call
func (*Cart_UnselectItem_Call) RunAndReturn ¶
func (_c *Cart_UnselectItem_Call) RunAndReturn(run func(context.Context, *cart.UnselectItemRequest, ...grpc.CallOption) (*cart.UnselectItemResponse, error)) *Cart_UnselectItem_Call
type Cart_UpdateItem_Call ¶
Cart_UpdateItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateItem'
func (*Cart_UpdateItem_Call) Return ¶
func (_c *Cart_UpdateItem_Call) Return(_a0 *cart.UpdateItemResponse, _a1 error) *Cart_UpdateItem_Call
func (*Cart_UpdateItem_Call) Run ¶
func (_c *Cart_UpdateItem_Call) Run(run func(ctx context.Context, in *cart.UpdateItemRequest, opts ...grpc.CallOption)) *Cart_UpdateItem_Call
func (*Cart_UpdateItem_Call) RunAndReturn ¶
func (_c *Cart_UpdateItem_Call) RunAndReturn(run func(context.Context, *cart.UpdateItemRequest, ...grpc.CallOption) (*cart.UpdateItemResponse, error)) *Cart_UpdateItem_Call
type DeleteCartItemLogic ¶
func NewDeleteCartItemLogic ¶
func NewDeleteCartItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteCartItemLogic
func (*DeleteCartItemLogic) DeleteCartItem ¶
func (l *DeleteCartItemLogic) DeleteCartItem(req *types.DeleteItemReq) error
type GetCartLogic ¶
func NewGetCartLogic ¶
func NewGetCartLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetCartLogic
type GetSelectedItemsLogic ¶
func NewGetSelectedItemsLogic ¶
func NewGetSelectedItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetSelectedItemsLogic
func (*GetSelectedItemsLogic) GetSelectedItems ¶
func (l *GetSelectedItemsLogic) GetSelectedItems() (resp *types.SelectedItemsResp, err error)
type SelectCartItemsLogic ¶
func NewSelectCartItemsLogic ¶
func NewSelectCartItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SelectCartItemsLogic
func (*SelectCartItemsLogic) SelectCartItems ¶
func (l *SelectCartItemsLogic) SelectCartItems(req *types.BatchOperateReq) error
type UnselectCartItemsLogic ¶
func NewUnselectCartItemsLogic ¶
func NewUnselectCartItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnselectCartItemsLogic
func (*UnselectCartItemsLogic) UnselectCartItems ¶
func (l *UnselectCartItemsLogic) UnselectCartItems(req *types.BatchOperateReq) error
type UpdateCartItemLogic ¶
func NewUpdateCartItemLogic ¶
func NewUpdateCartItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateCartItemLogic
func (*UpdateCartItemLogic) UpdateCartItem ¶
func (l *UpdateCartItemLogic) UpdateCartItem(req *types.CartItemReq) error