Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
Inventory represents methods to manage the inventory
func (*Inventory) GetProductStock ¶
GetProductStock returns the stock of a item given the ID
func (*Inventory) HasInStock ¶
HasInStock check if enough stock of a product is still present
func (*Inventory) RemoveFromStock ¶
func (i *Inventory) RemoveFromStock(items map[uint]uint, commitChan <-chan bool, errorChan chan<- error) error
RemoveFromStock removes the requested quantity for each product from stock Blocks until the stock is verified as suficient. Blocks writing to store until the condition is met
Click to show internal directories.
Click to hide internal directories.