services

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsService

type AccountsService interface {
	GetAccountByID(accID string) (*models.Account, error)
	ListAccounts() ([]models.Account, error)
	ListAccountsByType(typ models.AccountType) ([]models.Account, error)
	CreateAccount(account *models.Account) error
	UpdateAccountBalance(accID string, amount float64) error
	DeleteAccount(accID string) error
}

type EventService

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

type ExpenseService

type ExpenseService interface {
	AddExpense(params gqtypes.Expense) error
	ListExpenses() ([]*models.Expense, error)
}

type TransactionService

type TransactionService interface {
	AddTransaction(txn models.Transaction) error
	ListTransactions() ([]models.Transaction, error)
	ListTransactionsByType(txnType models.TransactionType) ([]models.Transaction, error)
	ListTransactionsByCategory(catID string) ([]models.Transaction, error)
	ListTransactionsBySubcategory(subcatID string) ([]models.Transaction, error)
	ListTransactionsByTime(txnType models.TransactionType, startTime, endTime int64) ([]models.Transaction, error)
	ListTransactionsBySourceID(srcID string) ([]models.Transaction, error)
	ListTransactionsByDestinationID(dstID string) ([]models.Transaction, error)
	ListTransactionsByUser(username string) ([]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 UserService

type UserService interface {
	GetUserByID(id string) (*models.User, error)
	GetUserByName(username string) (*models.User, error)
	ListUsers() ([]models.User, error)
	CreateUser(user *models.User) error
	UpdateUserBalance(id string, amount float64) error
	DeleteUser(id string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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