service

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 10 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 {
	Checkout(ctx context.Context, ID string) (*entity.Checkout, error)
	Add(ctx context.Context, items *entity.CartItem) error
}

type CartServiceImpl

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

func NewCartServiceImpl

func NewCartServiceImpl(stockService service.StockService, repo repository.CartRepository, checkoutRuleFile string) *CartServiceImpl

func (*CartServiceImpl) Add

func (s *CartServiceImpl) Add(ctx context.Context, item *entity.CartItem) error

func (*CartServiceImpl) Checkout

func (s *CartServiceImpl) Checkout(ctx context.Context, ID string) (*entity.Checkout, error)

Jump to

Keyboard shortcuts

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