cart

package
v0.0.0-...-3414fa2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCartItemLogic

type AddCartItemLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewAddCartItemLogic

func NewAddCartItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AddCartItemLogic

func (*AddCartItemLogic) AddCartItem

func (l *AddCartItemLogic) AddCartItem(req *types.CartItemReq) error

type Cart

type Cart struct {
	mock.Mock
}

Cart is an autogenerated mock type for the Cart type

func NewCart

func NewCart(t interface {
	mock.TestingT
	Cleanup(func())
}) *Cart

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) On

func (_m *Cart) On(s string, param any, request *cart.GetSelectedItemsRequest)

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

type Cart_AddItem_Call struct {
	*mock.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 (*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

type Cart_CheckStock_Call

type Cart_CheckStock_Call struct {
	*mock.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 (*Cart_CheckStock_Call) Run

func (*Cart_CheckStock_Call) RunAndReturn

type Cart_ClearCart_Call

type Cart_ClearCart_Call struct {
	*mock.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 (*Cart_ClearCart_Call) Run

func (*Cart_ClearCart_Call) RunAndReturn

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

type Cart_GetCart_Call struct {
	*mock.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 (*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

type Cart_GetSelectedItems_Call

type Cart_GetSelectedItems_Call struct {
	*mock.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 (*Cart_GetSelectedItems_Call) Run

type Cart_RemoveItem_Call

type Cart_RemoveItem_Call struct {
	*mock.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 (*Cart_RemoveItem_Call) Run

func (*Cart_RemoveItem_Call) RunAndReturn

type Cart_SelectAll_Call

type Cart_SelectAll_Call struct {
	*mock.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 (*Cart_SelectAll_Call) Run

func (*Cart_SelectAll_Call) RunAndReturn

type Cart_SelectItem_Call

type Cart_SelectItem_Call struct {
	*mock.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 (*Cart_SelectItem_Call) Run

func (*Cart_SelectItem_Call) RunAndReturn

type Cart_UnselectAll_Call

type Cart_UnselectAll_Call struct {
	*mock.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 (*Cart_UnselectAll_Call) Run

func (*Cart_UnselectAll_Call) RunAndReturn

type Cart_UnselectItem_Call

type Cart_UnselectItem_Call struct {
	*mock.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 (*Cart_UnselectItem_Call) Run

type Cart_UpdateItem_Call

type Cart_UpdateItem_Call struct {
	*mock.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 (*Cart_UpdateItem_Call) Run

func (*Cart_UpdateItem_Call) RunAndReturn

type DeleteCartItemLogic

type DeleteCartItemLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewDeleteCartItemLogic

func NewDeleteCartItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteCartItemLogic

func (*DeleteCartItemLogic) DeleteCartItem

func (l *DeleteCartItemLogic) DeleteCartItem(req *types.DeleteItemReq) error

type GetCartLogic

type GetCartLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetCartLogic

func NewGetCartLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetCartLogic

func (*GetCartLogic) GetCart

func (l *GetCartLogic) GetCart() (*types.CartInfo, error)

type GetSelectedItemsLogic

type GetSelectedItemsLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type SelectCartItemsLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewSelectCartItemsLogic

func NewSelectCartItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SelectCartItemsLogic

func (*SelectCartItemsLogic) SelectCartItems

func (l *SelectCartItemsLogic) SelectCartItems(req *types.BatchOperateReq) error

type UnselectCartItemsLogic

type UnselectCartItemsLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewUnselectCartItemsLogic

func NewUnselectCartItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnselectCartItemsLogic

func (*UnselectCartItemsLogic) UnselectCartItems

func (l *UnselectCartItemsLogic) UnselectCartItems(req *types.BatchOperateReq) error

type UpdateCartItemLogic

type UpdateCartItemLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewUpdateCartItemLogic

func NewUpdateCartItemLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateCartItemLogic

func (*UpdateCartItemLogic) UpdateCartItem

func (l *UpdateCartItemLogic) UpdateCartItem(req *types.CartItemReq) error

Jump to

Keyboard shortcuts

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