Documentation
¶
Index ¶
- type Repository
- func (s Repository) CreateTransaction(ctx context.Context, transaction *entities.Transaction) error
- func (s Repository) GetAccountBalance(ctx context.Context, accountName vos.AccountName) (*vos.AccountBalance, error)
- func (s Repository) GetAccountHistory(ctx context.Context, accountName vos.AccountName, ...) error
- func (s Repository) GetAnalyticalData(ctx context.Context, path vos.AccountPath, fn func(vos.Statement) error) error
- func (s Repository) LoadObjectsIntoCache(ctx context.Context, cachedAccounts *entities.CachedAccounts) (vos.Version, error)
- type UseCase
- func (m UseCase) CreateTransaction(ctx context.Context, id uuid.UUID, entries []entities.Entry) error
- func (m UseCase) GetAccountBalance(ctx context.Context, accountName vos.AccountName) (*vos.AccountBalance, error)
- func (m UseCase) GetAccountHistory(ctx context.Context, accountName vos.AccountName, ...) error
- func (m UseCase) GetAnalyticalData(ctx context.Context, path vos.AccountPath, fn func(vos.Statement) error) error
- func (m UseCase) LoadObjectsIntoCache(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct { OnCreateTransaction func(context.Context, *entities.Transaction) error OnLoadObjectsIntoCache func(ctx context.Context, cachedAccounts *entities.CachedAccounts) (vos.Version, error) OnGetAccountBalance func(ctx context.Context, accountName vos.AccountName) (*vos.AccountBalance, error) OnGetAnalyticalData func(ctx context.Context, path vos.AccountPath, fn func(vos.Statement) error) error OnGetAccountHistory func(ctx context.Context, accountName vos.AccountName, fn func(vos.EntryHistory) error) error }
func (Repository) CreateTransaction ¶
func (s Repository) CreateTransaction(ctx context.Context, transaction *entities.Transaction) error
func (Repository) GetAccountBalance ¶
func (s Repository) GetAccountBalance(ctx context.Context, accountName vos.AccountName) (*vos.AccountBalance, error)
func (Repository) GetAccountHistory ¶ added in v0.2.0
func (s Repository) GetAccountHistory(ctx context.Context, accountName vos.AccountName, fn func(vos.EntryHistory) error) error
func (Repository) GetAnalyticalData ¶
func (s Repository) GetAnalyticalData(ctx context.Context, path vos.AccountPath, fn func(vos.Statement) error) error
func (Repository) LoadObjectsIntoCache ¶
func (s Repository) LoadObjectsIntoCache(ctx context.Context, cachedAccounts *entities.CachedAccounts) (vos.Version, error)
type UseCase ¶
type UseCase struct { OnCreateTransaction func(ctx context.Context, id uuid.UUID, entries []entities.Entry) error OnLoadObjectsIntoCache func(ctx context.Context) error OnGetAccountBalance func(ctx context.Context, accountName vos.AccountName) (*vos.AccountBalance, error) OnGetAnalyticalData func(ctx context.Context, path vos.AccountPath, fn func(vos.Statement) error) error OnGetAccountHistory func(ctx context.Context, accountName vos.AccountName, fn func(vos.EntryHistory) error) error }
func SuccessfulTransactionMock ¶
func SuccessfulTransactionMock() UseCase
func (UseCase) CreateTransaction ¶
func (UseCase) GetAccountBalance ¶
func (m UseCase) GetAccountBalance(ctx context.Context, accountName vos.AccountName) (*vos.AccountBalance, error)
func (UseCase) GetAccountHistory ¶ added in v0.2.0
func (m UseCase) GetAccountHistory(ctx context.Context, accountName vos.AccountName, fn func(vos.EntryHistory) error) error
func (UseCase) GetAnalyticalData ¶
Click to show internal directories.
Click to hide internal directories.