service

package
v0.0.0-...-8f657ed Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IProductDataService

type IProductDataService interface {
	AddProduct(*model.Product) (int64, error)
	DeleteProduct(int64) error
	UpdateProduct(*model.Product) error
	FindProductByID(int64) (*model.Product, error)
	FindAllProduct() ([]model.Product, error)
}

func NewProductDataService

func NewProductDataService(productRepository repository.IProductRepository) IProductDataService

type ProductDataService

type ProductDataService struct {
	ProductRepository repository.IProductRepository
}

func (*ProductDataService) AddProduct

func (u *ProductDataService) AddProduct(product *model.Product) (int64, error)

func (*ProductDataService) DeleteProduct

func (u *ProductDataService) DeleteProduct(productID int64) error

func (*ProductDataService) FindAllProduct

func (u *ProductDataService) FindAllProduct() ([]model.Product, error)

func (*ProductDataService) FindProductByID

func (u *ProductDataService) FindProductByID(productID int64) (*model.Product, error)

func (*ProductDataService) UpdateProduct

func (u *ProductDataService) UpdateProduct(product *model.Product) error

Jump to

Keyboard shortcuts

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