producer

package
v0.0.0-...-f22805c 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 NewOrderAlertEvent

func NewOrderAlertEvent(
	orderNo string,
	userId int64,
	alertType string,
	alertLevel string,
	message string,
) *types.OrderAlertEvent

func NewOrderStatusChangedEvent

func NewOrderStatusChangedEvent(
	orderNo string,
	userId int64,
	oldStatus int32,
	newStatus int32,
	eventType types.OrderStatusEventType,
	paymentNo string,
	shippingNo string,
	refundNo string,
	reason string,
) *types.OrderStatusChangedEvent

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

Jump to

Keyboard shortcuts

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