core

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func New

func New(userRepository repository.UserRepository, accountRepository repository.AccountRepository, transactionRepository repository.TransactionRepository) *Core

func (*Core) CountUserAccountCategorySumsByTimeRange

func (c *Core) CountUserAccountCategorySumsByTimeRange(userUUID, accountUUID uuid.UUID, from, to time.Time) ([]*models.CategorySum, error)

func (*Core) CreateAccount

func (c *Core) CreateAccount(userUUID uuid.UUID, name string, currency iso4217.Currency) (*models.Account, error)

func (*Core) CreateTransaction

func (c *Core) CreateTransaction(userUUID, accountUUID uuid.UUID, t time.Time, amount float64, title, category string) (*models.Transaction, error)

func (Core) CreateUser

func (c Core) CreateUser() (*models.User, error)

func (*Core) DeleteAccount

func (c *Core) DeleteAccount(userUUID, accountUUID uuid.UUID) error

func (*Core) DeleteTransaction

func (c *Core) DeleteTransaction(userUUID, accountUUID, transactionUUID uuid.UUID) error

func (Core) DeleteUser

func (c Core) DeleteUser(userUUID uuid.UUID) error

func (*Core) GetUserAccountStatsByTimeRange

func (c *Core) GetUserAccountStatsByTimeRange(userUUID, accountUUID uuid.UUID, from, to time.Time) (*models.StatsTimeRange, error)

func (*Core) GetUserAccountStatsByTimeRangeCategories

func (c *Core) GetUserAccountStatsByTimeRangeCategories(userUUID, accountUUID uuid.UUID, from, to time.Time, categories []string) (*models.StatsTimeRangeCategories, error)

func (*Core) GetUserAccountTransaction

func (c *Core) GetUserAccountTransaction(userUUID, accountUUID, transactionUUID uuid.UUID) (*models.Transaction, error)

func (*Core) GetUserAccountTransactionsByTimeRange

func (c *Core) GetUserAccountTransactionsByTimeRange(userUUID, accountUUID uuid.UUID, from, to time.Time) ([]*models.Transaction, error)

func (*Core) GetUserAccountTransactionsByTimeRangeCategories

func (c *Core) GetUserAccountTransactionsByTimeRangeCategories(userUUID, accountUUID uuid.UUID, from, to time.Time, categories []string) ([]*models.Transaction, error)

func (*Core) GetUserAccounts

func (c *Core) GetUserAccounts(userUUID uuid.UUID) ([]*models.Account, error)

func (*Core) UpdateAccount

func (c *Core) UpdateAccount(userUUID, accountUUID uuid.UUID, name string, currency iso4217.Currency) (*models.Account, error)

func (*Core) UpdateTransaction

func (c *Core) UpdateTransaction(userUUID, accountUUID, transactionUUID uuid.UUID, t time.Time, amount float64, title, category string) (*models.Transaction, error)

func (Core) UpdateUser

func (c Core) UpdateUser(userUUID uuid.UUID) (*models.User, error)

Jump to

Keyboard shortcuts

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