repository

package
v0.0.0-...-fc1c61b Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository interface {
	CreateAccount(a *models.Account) error
	UpdateAccount(a *models.Account) error
	DeleteAccount(a *models.Account) error
	GetUserAccounts(userUUID uuid.UUID) ([]*models.Account, error)
}

type TransactionRepository

type TransactionRepository interface {
	CreateTransaction(t *models.Transaction) error
	UpdateTransaction(t *models.Transaction) error
	DeleteTransaction(t *models.Transaction) error
	GetUserAccountTransaction(userUUID, accountUUID, transactionUUID uuid.UUID) (*models.Transaction, error)
	GetUserAccountTransactionsByTimeRange(userUUID, accountUUID uuid.UUID, from, to time.Time) ([]*models.Transaction, error)
	GetUserAccountTransactionsByTimeRangeCategories(userUUID, accountUUID uuid.UUID, from, to time.Time, categories []string) ([]*models.Transaction, error)
	GetUserAccountStatsByTimeRange(userUUID, accountUUID uuid.UUID, from, to time.Time) (*models.StatsTimeRange, error)
	GetUserAccountStatsByTimeRangeCategories(userUUID, accountUUID uuid.UUID, from, to time.Time, categories []string) (*models.StatsTimeRangeCategories, error)
	CountUserAccountCategorySumsByTimeRange(userUUID, accountUUID uuid.UUID, from, to time.Time) ([]*models.CategorySum, error)
}

type UserRepository

type UserRepository interface {
	CreateUser(u *models.User) error
	UpdateUser(u *models.User) error
	DeleteUser(u *models.User) error
}

Jump to

Keyboard shortcuts

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