Documentation ¶
Index ¶
- func MapInputToOrder(i input.CreateOrderInput, product model.Product, uid uint) model.Order
- func VerifyPassword(hashedPass string, pass string) error
- type BuyerService
- type BuyerServiceImpl
- type OrderService
- type OrderServiceImpl
- func (service *OrderServiceImpl) Create(i input.CreateOrderInput, product model.Product, uid uint) (model.Order, error)
- func (service *OrderServiceImpl) GetOrderById(id uint) model.Order
- func (service *OrderServiceImpl) GetOrderListByBuyerId(buyerId uint, limit int, offset int) []model.Order
- func (service *OrderServiceImpl) GetOrderListBySellerId(sellerId uint, limit int, offset int) []model.Order
- func (service *OrderServiceImpl) UpdateStatusToAccepted(order model.Order) (model.Order, error)
- type ProductService
- type ProductServiceImpl
- func (service *ProductServiceImpl) Create(i input.CreateProductInput, uid uint) (model.Product, error)
- func (service *ProductServiceImpl) GetProductById(id uint) model.Product
- func (service *ProductServiceImpl) GetProductList(limit int, offset int) []model.Product
- func (service *ProductServiceImpl) GetProductListBySellerId(sellerId uint, limit int, offset int) []model.Product
- type SellerService
- type SellerServiceImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapInputToOrder ¶
func VerifyPassword ¶
Types ¶
type BuyerService ¶
type BuyerService interface { Create(i input.RegisterBuyerInput) (model.Buyer, error) BuyerLogin(email string, password string) (string, error) }
func NewBuyerService ¶
func NewBuyerService(BuyerRepository repository.BuyerRepository) BuyerService
type BuyerServiceImpl ¶
type BuyerServiceImpl struct {
BuyerRepository repository.BuyerRepository
}
func (*BuyerServiceImpl) BuyerLogin ¶
func (service *BuyerServiceImpl) BuyerLogin(email string, password string) (string, error)
func (*BuyerServiceImpl) Create ¶
func (service *BuyerServiceImpl) Create(i input.RegisterBuyerInput) (model.Buyer, error)
type OrderService ¶
type OrderService interface { Create(i input.CreateOrderInput, product model.Product, uid uint) (model.Order, error) GetOrderById(id uint) model.Order GetOrderListByBuyerId(buyerId uint, limit int, offset int) []model.Order GetOrderListBySellerId(sellerId uint, limit int, offset int) []model.Order UpdateStatusToAccepted(order model.Order) (model.Order, error) }
func NewOrderService ¶
func NewOrderService(orderRepository repository.OrderRepository) OrderService
type OrderServiceImpl ¶
type OrderServiceImpl struct {
OrderRepository repository.OrderRepository
}
func (*OrderServiceImpl) Create ¶
func (service *OrderServiceImpl) Create(i input.CreateOrderInput, product model.Product, uid uint) (model.Order, error)
func (*OrderServiceImpl) GetOrderById ¶
func (service *OrderServiceImpl) GetOrderById(id uint) model.Order
func (*OrderServiceImpl) GetOrderListByBuyerId ¶
func (*OrderServiceImpl) GetOrderListBySellerId ¶
func (*OrderServiceImpl) UpdateStatusToAccepted ¶
type ProductService ¶
type ProductService interface { Create(i input.CreateProductInput, uid uint) (model.Product, error) GetProductList(limit int, offset int) []model.Product GetProductById(id uint) model.Product GetProductListBySellerId(sellerId uint, limit int, offset int) []model.Product }
func NewProductService ¶
func NewProductService(ProductRepository repository.ProductRepository) ProductService
type ProductServiceImpl ¶
type ProductServiceImpl struct {
ProductRepository repository.ProductRepository
}
func (*ProductServiceImpl) Create ¶
func (service *ProductServiceImpl) Create(i input.CreateProductInput, uid uint) (model.Product, error)
func (*ProductServiceImpl) GetProductById ¶
func (service *ProductServiceImpl) GetProductById(id uint) model.Product
func (*ProductServiceImpl) GetProductList ¶
func (service *ProductServiceImpl) GetProductList(limit int, offset int) []model.Product
func (*ProductServiceImpl) GetProductListBySellerId ¶
type SellerService ¶
type SellerService interface { Create(i input.RegisterSellerInput) (model.Seller, error) SellerLogin(email string, password string) (string, error) }
func NewSellerService ¶
func NewSellerService(SellerRepository repository.SellerRepository) SellerService
type SellerServiceImpl ¶
type SellerServiceImpl struct {
SellerRepository repository.SellerRepository
}
func (SellerServiceImpl) Create ¶
func (service SellerServiceImpl) Create(i input.RegisterSellerInput) (model.Seller, error)
func (SellerServiceImpl) SellerLogin ¶
func (service SellerServiceImpl) SellerLogin(email string, password string) (string, error)
Click to show internal directories.
Click to hide internal directories.