Documentation ¶
Index ¶
- type CategoryDB
- type ProductDB
- func (pd *ProductDB) CreateProduct(Product *entity.Product) (*entity.Product, error)
- func (pd *ProductDB) GetProduct(id string) (*entity.Product, error)
- func (pd *ProductDB) GetProductByCategoryID(categoryID string) ([]*entity.Product, error)
- func (pd *ProductDB) GetProducts() ([]*entity.Product, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryDB ¶
type CategoryDB struct {
// contains filtered or unexported fields
}
func NewCategoryDB ¶
func NewCategoryDB(db *sql.DB) *CategoryDB
func (*CategoryDB) CreateCategory ¶
func (cd *CategoryDB) CreateCategory(category *entity.Category) (string, error)
func (*CategoryDB) GetCategories ¶
func (cd *CategoryDB) GetCategories() ([]*entity.Category, error)
func (*CategoryDB) GetCategory ¶
func (cd *CategoryDB) GetCategory(id string) (*entity.Category, error)
type ProductDB ¶
type ProductDB struct {
// contains filtered or unexported fields
}
func NewProductDB ¶
func (*ProductDB) CreateProduct ¶
func (*ProductDB) GetProductByCategoryID ¶
Click to show internal directories.
Click to hide internal directories.