products

package
v0.0.0-...-37234c6 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NameSearch

func NameSearch(search string) func(db *gorm.DB) *gorm.DB

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

Jump to

Keyboard shortcuts

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