Documentation
¶
Index ¶
- func NewOrderAlertEvent(orderNo string, userId int64, alertType string, alertLevel string, ...) *types.OrderAlertEvent
- func NewOrderStatusChangedEvent(orderNo string, userId int64, oldStatus int32, newStatus int32, ...) *types.OrderStatusChangedEvent
- type OrderProducer
- func (p *OrderProducer) Close() error
- func (p *OrderProducer) PublishAlert(ctx context.Context, event *types.OrderAlertEvent) error
- func (p *OrderProducer) PublishOrderCompleted(ctx context.Context, event *types.OrderCompletedEvent) error
- func (p *OrderProducer) PublishOrderCreated(ctx context.Context, event *types.OrderCreatedEvent) error
- func (p *OrderProducer) PublishOrderPaid(ctx context.Context, event *types.OrderPaidEvent) error
- func (p *OrderProducer) PublishOrderShipped(ctx context.Context, event *types.OrderShippedEvent) error
- func (p *OrderProducer) PublishStatusChanged(ctx context.Context, event *types.OrderStatusChangedEvent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOrderAlertEvent ¶
Types ¶
type OrderProducer ¶
type OrderProducer struct {
// contains filtered or unexported fields
}
func NewOrderProducer ¶
func NewOrderProducer(ch *amqp.Channel, exchange string) *OrderProducer
func (*OrderProducer) Close ¶
func (p *OrderProducer) Close() error
func (*OrderProducer) PublishAlert ¶
func (p *OrderProducer) PublishAlert(ctx context.Context, event *types.OrderAlertEvent) error
func (*OrderProducer) PublishOrderCompleted ¶
func (p *OrderProducer) PublishOrderCompleted(ctx context.Context, event *types.OrderCompletedEvent) error
func (*OrderProducer) PublishOrderCreated ¶
func (p *OrderProducer) PublishOrderCreated(ctx context.Context, event *types.OrderCreatedEvent) error
func (*OrderProducer) PublishOrderPaid ¶
func (p *OrderProducer) PublishOrderPaid(ctx context.Context, event *types.OrderPaidEvent) error
func (*OrderProducer) PublishOrderShipped ¶
func (p *OrderProducer) PublishOrderShipped(ctx context.Context, event *types.OrderShippedEvent) error
func (*OrderProducer) PublishStatusChanged ¶
func (p *OrderProducer) PublishStatusChanged(ctx context.Context, event *types.OrderStatusChangedEvent) error
Click to show internal directories.
Click to hide internal directories.