Documentation
¶
Index ¶
- Constants
- type Account
- type AccountRepository
- type AccountType
- type AccountTypeRepository
- type AverageByMonth
- type Balance
- type BalanceRepository
- func (br *BalanceRepository) GetAllBalances(ctx context.Context) ([]Balance, error)
- func (br *BalanceRepository) GetBalanceByID(ctx context.Context, balanceID uint) Balance
- func (br *BalanceRepository) GetBalancesByMonth(ctx context.Context, ledgerType string, startYearMonth time.Time, ...) []BalancesWithDate
- func (br *BalanceRepository) GetBalancesForAccount(ctx context.Context, accountID uint) []Balance
- func (br *BalanceRepository) GetBalancesOfAllAssetsByMonth(ctx context.Context, startYearMonth time.Time, endYearMonth time.Time) []BalancesWithDate
- func (br *BalanceRepository) GetBalancesOfAllLiabilitiesByMonth(ctx context.Context, startYearMonth time.Time, endYearMonth time.Time) []BalancesWithDate
- func (br *BalanceRepository) GetLatestBalanceForAccount(ctx context.Context, accountID uint) (balance Balance, err error)
- func (br *BalanceRepository) Save(balance Balance) (id uint, err error)
- type BalancesWithDate
- type Bootstrapper
- type Budget
- type BudgetRepository
- type Category
- type CategoryAndBudgetStatus
- type CategoryRepository
- func (cr *CategoryRepository) DeleteCategoryByID(categoryID uint) (err error)
- func (cr *CategoryRepository) GetAllCategories() ([]Category, error)
- func (cr *CategoryRepository) GetAllCategoriesAndBudgetStatus() (categories []CategoryAndBudgetStatus, err error)
- func (cr *CategoryRepository) GetCategoryByID(id uint) (Category, error)
- func (cr *CategoryRepository) GetCategoryByName(name string) (Category, error)
- func (cr *CategoryRepository) Save(category Category) (id uint, err error)
- type ImportSubmission
- type ImportSubmissionRepository
- type NetIncomeDataByDate
- type Settings
- type SettingsRepository
- type TTMAverageByDate
- type TotalByCategory
- type TotalByMonth
- type Transaction
- type TransactionRepository
- func (tr *TransactionRepository) Create(txn *Transaction) error
- func (tr *TransactionRepository) DeleteTransactionByID(ctx context.Context, id uint) (err error)
- func (tr *TransactionRepository) GetAllTransactions(accountID uint, categoryID uint, description string, startDate *time.Time, ...) ([]Transaction, error)
- func (tr *TransactionRepository) GetLatestTransactionForAccount(accountID uint) (txn Transaction, err error)
- func (tr *TransactionRepository) GetNetIncomeTotalsByDate(ctx context.Context, startYearMonth time.Time, endYearMonth time.Time) (NITByDate []NetIncomeDataByDate, err error)
- func (tr *TransactionRepository) GetSumOfTransactionsByCategory(startDate time.Time, endDate time.Time) (totals []TotalByCategory, err error)
- func (tr *TransactionRepository) GetSumOfTransactionsByCategoryAndMonth(categoryID uint, startDate time.Time, endDate time.Time) (totals []TotalByMonth, err error)
- func (tr *TransactionRepository) GetSumOfTransactionsByCategoryID(categoryID uint, startDate time.Time, endDate time.Time) (int, error)
- func (tr *TransactionRepository) GetTTMStatistics(ctx context.Context, yearMonth time.Time) (average int, twentyFifthPercentile int, seventyFifthPercentile int, err error)
- func (tr *TransactionRepository) GetTransactionByID(id uint) (Transaction, error)
- func (tr *TransactionRepository) GetTransactionsByHash(hash string, submissionID uint) ([]Transaction, error)
- func (tr *TransactionRepository) GetTransactionsByImportSubmission(id uint) ([]Transaction, error)
- func (tr *TransactionRepository) GetTransactionsForTraining() ([]Transaction, error)
- func (tr *TransactionRepository) Save(txn Transaction) (id uint, err error)
- type TransactionsByDate
Constants ¶
View Source
const Asset = "asset"
View Source
const Completed string = "COMPLETED"
View Source
const Failed string = "FAILED"
View Source
const Liability = "liability"
View Source
const Processing string = "PROCESSING"
View Source
const Submitted string = "SUBMITTED"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
gorm.Model
Name string
AccountTypeID uint
AccountType AccountType
}
type AccountRepository ¶
func (*AccountRepository) DeleteAccountByID ¶
func (ar *AccountRepository) DeleteAccountByID(accountID uint) (err error)
Soft deletes an account and all associated transactions and balances
func (*AccountRepository) GetAccountByID ¶
func (ar *AccountRepository) GetAccountByID(id uint) (Account, error)
func (*AccountRepository) GetAllAccounts ¶
func (ar *AccountRepository) GetAllAccounts() ([]Account, error)
type AccountType ¶
type AccountTypeRepository ¶
func (*AccountTypeRepository) GetAccountTypeByID ¶
func (atr *AccountTypeRepository) GetAccountTypeByID(id uint) (AccountType, error)
func (*AccountTypeRepository) GetAllAccountTypes ¶
func (atr *AccountTypeRepository) GetAllAccountTypes() ([]AccountType, error)
type AverageByMonth ¶
type BalanceRepository ¶
func (*BalanceRepository) GetAllBalances ¶
func (br *BalanceRepository) GetAllBalances(ctx context.Context) ([]Balance, error)
func (*BalanceRepository) GetBalanceByID ¶
func (br *BalanceRepository) GetBalanceByID(ctx context.Context, balanceID uint) Balance
func (*BalanceRepository) GetBalancesByMonth ¶
func (br *BalanceRepository) GetBalancesByMonth(ctx context.Context, ledgerType string, startYearMonth time.Time, endYearMonth time.Time) []BalancesWithDate
func (*BalanceRepository) GetBalancesForAccount ¶
func (br *BalanceRepository) GetBalancesForAccount(ctx context.Context, accountID uint) []Balance
func (*BalanceRepository) GetBalancesOfAllAssetsByMonth ¶
func (br *BalanceRepository) GetBalancesOfAllAssetsByMonth(ctx context.Context, startYearMonth time.Time, endYearMonth time.Time) []BalancesWithDate
func (*BalanceRepository) GetBalancesOfAllLiabilitiesByMonth ¶
func (br *BalanceRepository) GetBalancesOfAllLiabilitiesByMonth(ctx context.Context, startYearMonth time.Time, endYearMonth time.Time) []BalancesWithDate
func (*BalanceRepository) GetLatestBalanceForAccount ¶
type BalancesWithDate ¶
type Bootstrapper ¶
type Bootstrapper struct {
// contains filtered or unexported fields
}
func NewBootstrapper ¶
func NewBootstrapper(db *gorm.DB) *Bootstrapper
func (*Bootstrapper) BootstrapDatabase ¶
func (b *Bootstrapper) BootstrapDatabase(ctx context.Context)
type BudgetRepository ¶
func (*BudgetRepository) DeleteByID ¶
func (br *BudgetRepository) DeleteByID(budgetID uint) (err error)
func (*BudgetRepository) GetAllBudgets ¶
func (*BudgetRepository) GetAllBudgets() ([]Budget, error)
func (*BudgetRepository) GetBudgetByID ¶
func (*BudgetRepository) GetBudgetByID(id uint) (Budget, error)
type CategoryAndBudgetStatus ¶
type CategoryRepository ¶
func (*CategoryRepository) DeleteCategoryByID ¶
func (cr *CategoryRepository) DeleteCategoryByID(categoryID uint) (err error)
Soft deletes a category and sets all associated transactions to Unknown
func (*CategoryRepository) GetAllCategories ¶
func (cr *CategoryRepository) GetAllCategories() ([]Category, error)
func (*CategoryRepository) GetAllCategoriesAndBudgetStatus ¶
func (cr *CategoryRepository) GetAllCategoriesAndBudgetStatus() (categories []CategoryAndBudgetStatus, err error)
func (*CategoryRepository) GetCategoryByID ¶
func (cr *CategoryRepository) GetCategoryByID(id uint) (Category, error)
func (*CategoryRepository) GetCategoryByName ¶
func (cr *CategoryRepository) GetCategoryByName(name string) (Category, error)
type ImportSubmission ¶
type ImportSubmissionRepository ¶
func (*ImportSubmissionRepository) Save ¶
func (isr *ImportSubmissionRepository) Save(submission ImportSubmission) (id uint, err error)
Save is an UPSERT operation, returning the ID of the record and an optional error
type NetIncomeDataByDate ¶
type SettingsRepository ¶ added in v1.1.0
func (*SettingsRepository) GetSettings ¶ added in v1.1.0
func (sr *SettingsRepository) GetSettings() (settings *Settings, err error)
func (*SettingsRepository) PopulateSettings ¶ added in v1.1.0
func (sr *SettingsRepository) PopulateSettings() (err error)
func (*SettingsRepository) Save ¶ added in v1.1.0
func (sr *SettingsRepository) Save(settings *Settings) (err error)
Save is an UPSERT operation, returning the ID of the record and an optional error
type TTMAverageByDate ¶
type TotalByCategory ¶
type TotalByMonth ¶
type Transaction ¶
type TransactionRepository ¶
func (*TransactionRepository) Create ¶
func (tr *TransactionRepository) Create(txn *Transaction) error
func (*TransactionRepository) DeleteTransactionByID ¶
func (tr *TransactionRepository) DeleteTransactionByID(ctx context.Context, id uint) (err error)
Soft deletes a transaction
func (*TransactionRepository) GetAllTransactions ¶
func (tr *TransactionRepository) GetAllTransactions(accountID uint, categoryID uint, description string, startDate *time.Time, endDate *time.Time) ([]Transaction, error)
func (*TransactionRepository) GetLatestTransactionForAccount ¶
func (tr *TransactionRepository) GetLatestTransactionForAccount(accountID uint) (txn Transaction, err error)
func (*TransactionRepository) GetNetIncomeTotalsByDate ¶
func (tr *TransactionRepository) GetNetIncomeTotalsByDate(ctx context.Context, startYearMonth time.Time, endYearMonth time.Time) (NITByDate []NetIncomeDataByDate, err error)
func (*TransactionRepository) GetSumOfTransactionsByCategory ¶
func (tr *TransactionRepository) GetSumOfTransactionsByCategory(startDate time.Time, endDate time.Time) (totals []TotalByCategory, err error)
func (*TransactionRepository) GetSumOfTransactionsByCategoryAndMonth ¶
func (tr *TransactionRepository) GetSumOfTransactionsByCategoryAndMonth(categoryID uint, startDate time.Time, endDate time.Time) (totals []TotalByMonth, err error)
func (*TransactionRepository) GetSumOfTransactionsByCategoryID ¶
func (*TransactionRepository) GetTTMStatistics ¶
func (*TransactionRepository) GetTransactionByID ¶
func (tr *TransactionRepository) GetTransactionByID(id uint) (Transaction, error)
func (*TransactionRepository) GetTransactionsByHash ¶
func (tr *TransactionRepository) GetTransactionsByHash(hash string, submissionID uint) ([]Transaction, error)
func (*TransactionRepository) GetTransactionsByImportSubmission ¶
func (tr *TransactionRepository) GetTransactionsByImportSubmission(id uint) ([]Transaction, error)
func (*TransactionRepository) GetTransactionsForTraining ¶
func (tr *TransactionRepository) GetTransactionsForTraining() ([]Transaction, error)
func (*TransactionRepository) Save ¶
func (tr *TransactionRepository) Save(txn Transaction) (id uint, err error)
Save is an UPSERT operation, returning the ID of the record and an optional error
type TransactionsByDate ¶
type TransactionsByDate struct {
Date time.Time
Transactions []Transaction
}
Click to show internal directories.
Click to hide internal directories.