repository

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransactionRepository

type TransactionRepository 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)
}

TransactionRepository interface defines the methods that the transaction repository must implement.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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