Documentation ¶
Index ¶
- func NewPaymentCreatedEvent(orderNo string, paymentNo string, amount float64, paymentMethod int32, ...) *types.PaymentCreatedEvent
- func NewPaymentFailedEvent(orderNo string, paymentNo string, amount float64, reason string, ...) *types.PaymentFailedEvent
- func NewPaymentRefundEvent(orderNo string, paymentNo string, refundNo string, refundAmount float64, ...) *types.PaymentRefundEvent
- func NewPaymentSuccessEvent(orderNo string, paymentNo string, amount float64, paymentMethod int32, ...) *types.PaymentSuccessEvent
- func NewPaymentVerificationEvent(orderNo string, paymentNo string, verified bool, message string) *types.PaymentVerificationEvent
- type PaymentProducer
- func (p *PaymentProducer) Close() error
- func (p *PaymentProducer) PublishPaymentCreated(ctx context.Context, event *types.PaymentCreatedEvent) error
- func (p *PaymentProducer) PublishPaymentFailed(ctx context.Context, event *types.PaymentFailedEvent) error
- func (p *PaymentProducer) PublishPaymentRefund(ctx context.Context, event *types.PaymentRefundEvent) error
- func (p *PaymentProducer) PublishPaymentSuccess(ctx context.Context, event *types.PaymentSuccessEvent) error
- func (p *PaymentProducer) PublishPaymentVerification(ctx context.Context, event *types.PaymentVerificationEvent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPaymentCreatedEvent ¶
func NewPaymentFailedEvent ¶
func NewPaymentRefundEvent ¶
func NewPaymentSuccessEvent ¶
Types ¶
type PaymentProducer ¶
type PaymentProducer struct {
// contains filtered or unexported fields
}
func NewPaymentProducer ¶
func NewPaymentProducer(ch *amqp.Channel, exchange string) *PaymentProducer
func (*PaymentProducer) Close ¶
func (p *PaymentProducer) Close() error
func (*PaymentProducer) PublishPaymentCreated ¶
func (p *PaymentProducer) PublishPaymentCreated(ctx context.Context, event *types.PaymentCreatedEvent) error
func (*PaymentProducer) PublishPaymentFailed ¶
func (p *PaymentProducer) PublishPaymentFailed(ctx context.Context, event *types.PaymentFailedEvent) error
func (*PaymentProducer) PublishPaymentRefund ¶
func (p *PaymentProducer) PublishPaymentRefund(ctx context.Context, event *types.PaymentRefundEvent) error
func (*PaymentProducer) PublishPaymentSuccess ¶
func (p *PaymentProducer) PublishPaymentSuccess(ctx context.Context, event *types.PaymentSuccessEvent) error
func (*PaymentProducer) PublishPaymentVerification ¶
func (p *PaymentProducer) PublishPaymentVerification(ctx context.Context, event *types.PaymentVerificationEvent) error
Click to show internal directories.
Click to hide internal directories.