Documentation
¶
Index ¶
- func Connect() (*sql.DB, error)
- type Products
- func (p Products) Create(product *models.Product) error
- func (p Products) DeleteProduct(productID string) error
- func (p Products) GetByID(productID string) (models.Product, error)
- func (p Products) ListAll() ([]models.Product, error)
- func (p Products) UpdateProduct(productID string, product *models.Product) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Products ¶
type Products struct {
// contains filtered or unexported fields
}
func NewProductInstance ¶
NewInstance creates a instance for connecting to Products table in database
func (Products) DeleteProduct ¶
DeleteProduct deletes a product by its ID
Click to show internal directories.
Click to hide internal directories.