Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionUseCases ¶
type TransactionUseCases interface { // GetByID returns a transaction by its ID. GetByID(ID uuid.UUID) (tx entity.Transaction, err error) // GetByAccountID returns a transaction by its account ID. GetByAccountID(accountID uuid.UUID) (txs []entity.Transaction, err error) // GetCreditsByAccountID returns the credits of an account. GetCreditsByAccountID(accountID uuid.UUID) (txs []entity.Transaction, err error) // GetDebitsByAccountID returns the debits of an account. GetDebitsByAccountID(accountID uuid.UUID) (txs []entity.Transaction, err error) // GetTransactionsByOrigin returns the transactions of an account by origin. GetTransactionsByOrigin(origin string) (txs []entity.Transaction, err error) // Create creates a new transaction. Create(tx entity.Transaction) (err error) }
TransactionUseCases interface defines the transaction use cases.
func NewTransactionUseCases ¶
func NewTransactionUseCases(transactionRepo repository.TransactionRepository) (usecases TransactionUseCases, err error)
NewTransactionUseCases returns a new transaction use cases.
Click to show internal directories.
Click to hide internal directories.