usecases

package
v0.0.0-...-e754585 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 5 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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