services

package
v0.0.0-...-d38871e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartService

type CartService interface {
	SaveCartItem(ctx context.Context, item *cart.CartItem) (*cart.CartItem, error)
	GetUserCartItems(ctx context.Context, userId string) ([]cart.CartItem, error)
	BulkRemoveItemsFromUserCart(ctx context.Context, userId string, itemIds []string) ([]cart.CartItem, error)
}

CartService is the interface that describes a cart service object.

type CartServiceImpl

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

func NewCartService

func NewCartService(cartRepo cart.Repository, tracer opentracing.Tracer) *CartServiceImpl

NewCartService returns a new cart service object.

func (*CartServiceImpl) BulkRemoveItemsFromUserCart

func (s *CartServiceImpl) BulkRemoveItemsFromUserCart(
	ctx context.Context, userId string, itemIds []string,
) ([]cart.CartItem, error)

func (*CartServiceImpl) GetUserCartItems

func (s *CartServiceImpl) GetUserCartItems(ctx context.Context, userId string) ([]cart.CartItem, error)

func (*CartServiceImpl) SaveCartItem

func (s *CartServiceImpl) SaveCartItem(ctx context.Context, item *cart.CartItem) (*cart.CartItem, error)

SaveCartItem is the service handler to save an item to cart.

Jump to

Keyboard shortcuts

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