repos

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsRepository

type AccountsRepository interface {
	GetAccountByShortName(userID int64, shortName string) (*models.Account, error)
	ListAccounts(userID int64) ([]models.Account, error)
	ListAccountsByType(userID int64, typ models.AccountType) ([]models.Account, error)
	AddNewAccount(account *models.Account) error
	UpdateAccountBalance(userID int64, shortName string, txnAmount float64) error
	DeleteAccount(userID int64, shortName string) error
}

type DebtorCreditorRepository added in v1.0.1

type DebtorCreditorRepository interface {
	GetDebtorCreditorByID(id int64) (*models.DebtorsCreditors, error)
	GetDebtorCreditorByName(userID int64, name string) (*models.DebtorsCreditors, error)
	ListDebtorCreditors(userID int64) ([]models.DebtorsCreditors, error)
	AddNewDebtorCreditor(drcr *models.DebtorsCreditors) error
	UpdateDebtorCreditorBalance(id int64, amount float64) error
	DeleteDebtorCreditor(id int64) error
}

type EventRepository

type EventRepository interface {
	AddEvent(event string) error
	ListEvents() ([]models.Event, error)
}

type ExpenseRepository

type ExpenseRepository interface {
	GetLastExpense() (*models.Expense, error)
	ListAllExpenses() ([]*models.Expense, error)
	AddNewExpense(expense *models.Expense) error
	DeleteExpense(id string) error
	EditExpense(expense *models.Expense) error
}

type TransactionRepository

type TransactionRepository interface {
	AddTransaction(txn models.Transaction) error
	ListTransactionsByCategory(userID int64, catID string) ([]models.Transaction, error)
	ListTransactions(filter models.Transaction) ([]models.Transaction, error)
	ListTransactionsByTime(userID int64, txnType models.TransactionType, startTime, endTime int64) ([]models.Transaction, error)

	GetTxnCategoryName(catID string) (string, error)
	ListTxnCategories() ([]models.TxnCategory, error)
	GetTxnSubcategoryName(subcatID string) (string, error)
	ListTxnSubcategories(catID string) ([]models.TxnSubcategory, error)
	UpdateTxnCategories() error
}

type UserRepository

type UserRepository interface {
	GetUserByID(id int64) (*models.User, error)
	GetUser(filter models.User) (*models.User, error)
	ListUsers() ([]models.User, error)
	AddNewUser(user *models.User) error
	UpdateUser(id int64, user *models.User) error
	DeleteUser(id int64) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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