Documentation ¶
Index ¶
- type HomeDB
- func (hdb *HomeDB) AddInventory(productId int, locationId int, amount int) error
- func (hdb *HomeDB) AddProductToInventoryByEan(ean string) error
- func (hdb *HomeDB) CreateProductCategory(categoryName string) error
- func (hdb *HomeDB) DecrementFromInventoryByEan(ean string) (string, int, error)
- func (hdb *HomeDB) DeleteProductCategory(categoryId int) error
- func (hdb *HomeDB) GetCreateProductCategory(tx *sql.Tx, category string) (int, error)
- func (hdb *HomeDB) GetInventory() ([]inventory.Entry, error)
- func (hdb *HomeDB) GetLocations() ([]inventory.Location, error)
- func (hdb *HomeDB) GetProductCategories() ([]product.Category, error)
- func (hdb *HomeDB) GetProducts() ([]product.Product, error)
- func (hdb *HomeDB) RemoveFromInventory(productId int, locationId int) error
- func (hdb *HomeDB) RemoveProduct(productId int) error
- func (hdb *HomeDB) ResolveProduct(ean string) (*product.Product, error)
- func (hdb *HomeDB) UpdateInventoryEntry(productId int, locationId int, newAmount *int, newLocationId *int) error
- func (hdb *HomeDB) UpdateProduct(productId int, productName *string, productDescription *string, ...) error
- func (hdb *HomeDB) UpdateProductCategory(categoryId int, categoryName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HomeDB ¶
type HomeDB struct {
// contains filtered or unexported fields
}
func (*HomeDB) AddInventory ¶
func (*HomeDB) AddProductToInventoryByEan ¶
func (*HomeDB) CreateProductCategory ¶
func (*HomeDB) DecrementFromInventoryByEan ¶
checks if for the given ean a product exists in the inventory, if so decrements the amount if the amount reaches zero, the inventory entry is removed returns the products category name or the name if no category was set
func (*HomeDB) DeleteProductCategory ¶
func (*HomeDB) GetCreateProductCategory ¶
func (*HomeDB) GetProductCategories ¶
func (*HomeDB) RemoveFromInventory ¶
func (*HomeDB) RemoveProduct ¶
func (*HomeDB) ResolveProduct ¶
tries to resolve product from the database by the products EAN
func (*HomeDB) UpdateInventoryEntry ¶
func (*HomeDB) UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.