producer

package
v0.0.0-...-3414fa2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStockAlertEvent

func NewStockAlertEvent(
	warehouseID int64,
	skuID int64,
	current int32,
	threshold int32,
) *types.StockAlertEvent

func NewStockLockedEvent

func NewStockLockedEvent(
	warehouseID int64,
	orderNo string,
	items []types.StockItem,
) *types.StockLockedEvent

func NewStockLowStockEvent

func NewStockLowStockEvent(
	warehouseID int64,
	skuID int64,
	quantity int32,
	threshold int32,
) *types.StockLowStockEvent

func NewStockOutOfStockEvent

func NewStockOutOfStockEvent(
	warehouseID int64,
	skuID int64,
	quantity int32,
	reason string,
) *types.StockOutOfStockEvent

func NewStockUnlockedEvent

func NewStockUnlockedEvent(
	warehouseID int64,
	orderNo string,
	items []types.StockItem,
) *types.StockUnlockedEvent

func NewStockUpdatedEvent

func NewStockUpdatedEvent(
	warehouseID int64,
	skuID int64,
	oldQuantity int32,
	newQuantity int32,
	reason string,
) *types.StockUpdatedEvent

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL