Documentation ¶
Index ¶
- type InventoryService
- func (s *InventoryService) CheckAvailability(ctx context.Context, productID int, quantity uint) (bool, error)
- func (s *InventoryService) CreateInventoryItem(ctx context.Context, productID int, quantity int) (*model.InventoryItem, error)
- func (s *InventoryService) DecrementInventory(ctx context.Context, productID int, quantity uint) error
- func (s *InventoryService) GetInventoryByProductID(ctx context.Context, productID int) (*model.InventoryItem, error)
- func (s *InventoryService) IncrementInventory(ctx context.Context, productID int, quantity uint) error
- func (s *InventoryService) Listen(ctx context.Context, topic events.Topic, key events.RoutingKey) error
- func (s *InventoryService) Publish(ctx context.Context, topic events.Topic, key events.RoutingKey, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InventoryService ¶
type InventoryService struct {
// contains filtered or unexported fields
}
func NewInventoryService ¶
func NewInventoryService(repo repository.InventoryRepository, rc *events.RabbitClient, l *zerolog.Logger) (*InventoryService, error)
func (*InventoryService) CheckAvailability ¶
func (*InventoryService) CreateInventoryItem ¶
func (s *InventoryService) CreateInventoryItem(ctx context.Context, productID int, quantity int) (*model.InventoryItem, error)
func (*InventoryService) DecrementInventory ¶
func (*InventoryService) GetInventoryByProductID ¶
func (s *InventoryService) GetInventoryByProductID(ctx context.Context, productID int) (*model.InventoryItem, error)
func (*InventoryService) IncrementInventory ¶
func (*InventoryService) Listen ¶
func (s *InventoryService) Listen(ctx context.Context, topic events.Topic, key events.RoutingKey) error
Click to show internal directories.
Click to hide internal directories.