accounts

package
v0.0.0-...-4d895cd Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrencyRates

type CurrencyRates interface {
	Convert(amount currency.Amount, to currency.Code, date datetime.DateTime) (*currency.Amount, error)
}

type Repository

type Repository interface {
	GetAll() ([]entities.Account, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(repo Repository, currencyRates CurrencyRates) *Service

func (*Service) CalculateBalances

func (s *Service) CalculateBalances(_ context.Context, chunk []entities.Transaction) (map[uint64]entities.Account, error)

CalculateBalances calculates the balances of all accounts affected by the given transactions.

Jump to

Keyboard shortcuts

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