repository

package
v0.0.0-...-533a7b2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 4 Imported by: 0

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)

Jump to

Keyboard shortcuts

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