services

package
v0.0.0-...-6d4792c Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartService

func (*CartService) AddProductToCart

func (service *CartService) AddProductToCart(userId int, productId int) (bool, error)

func (*CartService) DeleteFromCart

func (service *CartService) DeleteFromCart(userId int) (bool, error)

func (*CartService) GetCart

func (service *CartService) GetCart(userId int) (DTO.CartDTO, error)

type OrderService

func (*OrderService) GetById

func (service *OrderService) GetById(orderId int) (models.OrderModel, error)

func (*OrderService) GetUnProcessedOrders

func (service *OrderService) GetUnProcessedOrders(status string) []models.OrderModel

func (*OrderService) ListOrders

func (service *OrderService) ListOrders(userId int) (DTO.OrdersDTO, error)

func (*OrderService) ProcessNewOrder

func (service *OrderService) ProcessNewOrder(cardDTO DTO.CartDTO) (DTO.OrderDTO, error)

func (*OrderService) Update

func (service *OrderService) Update(model models.OrderModel) (bool, error)

type ProductService

type ProductService struct {
	interfaces.IProductRepository
	interfaces.ICartRepository
}

func (*ProductService) GetById

func (service *ProductService) GetById(id int) (models.ProductModel, error)

func (*ProductService) GetProduct

func (service *ProductService) GetProduct(userId int, productId int) (DTO.ProductDTO, error)

type UserService

type UserService struct {
	interfaces.IUserRepository
}

func (*UserService) GetById

func (service *UserService) GetById(orderId int) (models.UserModel, error)

func (*UserService) Update

func (service *UserService) Update(model models.UserModel) (bool, error)

Jump to

Keyboard shortcuts

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