Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductRepository ¶
type ProductRepository struct {
// contains filtered or unexported fields
}
func NewProductRepository ¶
func NewProductRepository(db *sql.DB) *ProductRepository
func (*ProductRepository) GetProductById ¶
func (r *ProductRepository) GetProductById(id int) (Product, error)
GetProductById returns the product with the given id. This Product Entity was not supposed to be returned. We should return a DTO instead. However, we will return it for now to keep example simple.
type RepositoryInterface ¶
Click to show internal directories.
Click to hide internal directories.