Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCalculated ¶
func HandleCalculated( uow repository.UnitOfWork, logger *slog.Logger, ) eventbus.HandlerFunc
HandleCalculated handles FeesCalculated events. It updates the transaction with the calculated fees and deducts them from the account balance.
Types ¶
type FeeCalculator ¶
type FeeCalculator struct {
// contains filtered or unexported fields
}
FeeCalculator handles fee calculation and application to transactions and accounts
func NewFeeCalculator ¶
func NewFeeCalculator( txRepo repotransaction.Repository, accRepo repoaccount.Repository, logger *slog.Logger, ) *FeeCalculator
NewFeeCalculator creates a new FeeCalculator instance Returns nil if any of the required parameters are nil
Click to show internal directories.
Click to hide internal directories.