command

package
v0.0.0-...-0c44e78 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHandler

type CommandHandler[C any] interface {
	Handle(ctx context.Context, cmd C) error
}

type CreatePayment

type CreatePayment struct {
	ID           uint64
	CustomerID   uint64
	Amount       uint64
	CurrencyCode string
}

type CreatePaymentHandler

type CreatePaymentHandler CommandHandler[CreatePayment]

func NewCreatePaymentHandler

func NewCreatePaymentHandler(logger logger.Logger, paymentRepo domain.PaymentRepository) CreatePaymentHandler

type RollbackPayment

type RollbackPayment struct {
	PaymentID uint64
}

type RollbackPaymentHandler

type RollbackPaymentHandler CommandHandler[RollbackPayment]

func NewRollbackPaymentHandler

func NewRollbackPaymentHandler(logger logger.Logger, paymentRepo domain.PaymentRepository) RollbackPaymentHandler

Jump to

Keyboard shortcuts

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