Documentation
¶
Index ¶
- func NewStockAlertEvent(warehouseID int64, skuID int64, current int32, threshold int32) *types.StockAlertEvent
- func NewStockLockedEvent(warehouseID int64, orderNo string, items []types.StockItem) *types.StockLockedEvent
- func NewStockLowStockEvent(warehouseID int64, skuID int64, quantity int32, threshold int32) *types.StockLowStockEvent
- func NewStockOutOfStockEvent(warehouseID int64, skuID int64, quantity int32, reason string) *types.StockOutOfStockEvent
- func NewStockUnlockedEvent(warehouseID int64, orderNo string, items []types.StockItem) *types.StockUnlockedEvent
- func NewStockUpdatedEvent(warehouseID int64, skuID int64, oldQuantity int32, newQuantity int32, ...) *types.StockUpdatedEvent
- type InventoryProducer
- func (p *InventoryProducer) Close() error
- func (p *InventoryProducer) PublishStockDeducted(ctx context.Context, event *types.StockDeductedEvent) error
- func (p *InventoryProducer) PublishStockLocked(ctx context.Context, event *types.StockLockedEvent) error
- func (p *InventoryProducer) PublishStockLowStock(ctx context.Context, event *types.StockLowStockEvent) error
- func (p *InventoryProducer) PublishStockOutOfStock(ctx context.Context, event *types.StockOutOfStockEvent) error
- func (p *InventoryProducer) PublishStockUnlocked(ctx context.Context, event *types.StockUnlockedEvent) error
- func (p *InventoryProducer) PublishStockUpdated(ctx context.Context, event *types.StockUpdatedEvent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStockAlertEvent ¶
func NewStockLockedEvent ¶
func NewStockLowStockEvent ¶
func NewStockOutOfStockEvent ¶
func NewStockUnlockedEvent ¶
func NewStockUpdatedEvent ¶
Types ¶
type InventoryProducer ¶
type InventoryProducer struct {
// contains filtered or unexported fields
}
func NewInventoryProducer ¶
func NewInventoryProducer(ch *amqp.Channel, exchange string) *InventoryProducer
func (*InventoryProducer) Close ¶
func (p *InventoryProducer) Close() error
func (*InventoryProducer) PublishStockDeducted ¶
func (p *InventoryProducer) PublishStockDeducted(ctx context.Context, event *types.StockDeductedEvent) error
func (*InventoryProducer) PublishStockLocked ¶
func (p *InventoryProducer) PublishStockLocked(ctx context.Context, event *types.StockLockedEvent) error
func (*InventoryProducer) PublishStockLowStock ¶
func (p *InventoryProducer) PublishStockLowStock(ctx context.Context, event *types.StockLowStockEvent) error
func (*InventoryProducer) PublishStockOutOfStock ¶
func (p *InventoryProducer) PublishStockOutOfStock(ctx context.Context, event *types.StockOutOfStockEvent) error
func (*InventoryProducer) PublishStockUnlocked ¶
func (p *InventoryProducer) PublishStockUnlocked(ctx context.Context, event *types.StockUnlockedEvent) error
func (*InventoryProducer) PublishStockUpdated ¶
func (p *InventoryProducer) PublishStockUpdated(ctx context.Context, event *types.StockUpdatedEvent) error
Click to show internal directories.
Click to hide internal directories.