Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultProductRepo ¶
type DefaultProductRepo struct {
// contains filtered or unexported fields
}
func (*DefaultProductRepo) GetAllProducts ¶
func (r *DefaultProductRepo) GetAllProducts(params ProductQueryParams) (*[]models.Product, error)
func (*DefaultProductRepo) GetProductByID ¶
func (r *DefaultProductRepo) GetProductByID(id int) (*models.Product, error)
type DefaultProductService ¶
type DefaultProductService struct {
// contains filtered or unexported fields
}
func (*DefaultProductService) RegisterRoutes ¶
func (s *DefaultProductService) RegisterRoutes(router *mux.Router) error
type ProductQueryParams ¶
type ProductQueryParams struct { shared.SearchParams Voucher *models.Voucher }
type ProductRepo ¶
type ProductRepo interface { GetAllProducts(params ProductQueryParams) (*[]models.Product, error) GetProductByID(id int) (*models.Product, error) }
func NewDefaultProductRepo ¶
func NewDefaultProductRepo(db *gorm.DB) ProductRepo
type ProductService ¶
type ProductService interface { RegisterRoutes(router *mux.Router) error // contains filtered or unexported methods }
func NewDefaultProductService ¶
func NewDefaultProductService(productRepo ProductRepo, voucherRepo voucher.VoucherRepo) ProductService
Click to show internal directories.
Click to hide internal directories.