service

package
v0.0.0-...-3ce5cd6 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cart

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

func NewCart

func NewCart(cartRepo contract.CartRepository) *Cart

func (*Cart) AddProductIntoCart

func (c *Cart) AddProductIntoCart(cartID string, productID int64) (entity.CartItem, error)

func (*Cart) CreateCart

func (c *Cart) CreateCart() (string, error)

func (*Cart) ListProductsInCart

func (c *Cart) ListProductsInCart(cartID string) ([]entity.CartItem, error)

func (*Cart) RemoveProductFromCart

func (c *Cart) RemoveProductFromCart(cartID string, productID int64) error

type Category

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

func NewCategory

func NewCategory(categoryRepo contract.CategoryRepository) *Category

func (*Category) ListAllCategories

func (c *Category) ListAllCategories() ([]entity.Category, error)

func (*Category) ListProductsByCategoryID

func (c *Category) ListProductsByCategoryID(categoryID, since int64, limit int32) ([]entity.Product, error)

type Order

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

func NewOrder

func NewOrder(orderRepo contract.OrderRepository) *Order

func (*Order) Checkout

func (c *Order) Checkout(cartID, customerName, customerEmail, customerAddress string) (entity.Order, error)

func (*Order) View

func (c *Order) View(orderID string) (entity.Order, error)

Jump to

Keyboard shortcuts

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