Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductRepoInterface ¶
type ProductRepoInterface interface { FetchProduct() ([]schema.ProductInfo, error) GetByID(id int) (*schema.ProductDetail, error) GetByName(name string) ([]schema.ProductInfo, error) }
type ProductRepository ¶
type ProductRepository struct {
// contains filtered or unexported fields
}
func NewProductRepo ¶
func NewProductRepo(db *sql.DB) *ProductRepository
func (*ProductRepository) FetchProduct ¶
func (p *ProductRepository) FetchProduct() ([]schema.ProductInfo, error)
func (*ProductRepository) GetByID ¶
func (p *ProductRepository) GetByID(id int) (*schema.ProductDetail, error)
func (*ProductRepository) GetByName ¶
func (p *ProductRepository) GetByName(name string) ([]schema.ProductInfo, error)
Click to show internal directories.
Click to hide internal directories.