Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteBackups(file LedgerFile) gin.H
- func GetAccountGain(db *gorm.DB, account string) gin.H
- func GetAllocation(db *gorm.DB) gin.H
- func GetBudget(db *gorm.DB) gin.H
- func GetCapitalGains(db *gorm.DB) gin.H
- func GetCashFlow(db *gorm.DB) gin.H
- func GetCurrentBudget(db *gorm.DB) gin.H
- func GetCurrentExpense(db *gorm.DB) map[string][]posting.Posting
- func GetCurrentNetworth(db *gorm.DB) gin.H
- func GetDashboard(db *gorm.DB) gin.H
- func GetDiagnosis(db *gorm.DB) gin.H
- func GetExpense(db *gorm.DB) gin.H
- func GetFile(file LedgerFile) gin.H
- func GetFiles(db *gorm.DB) gin.H
- func GetGain(db *gorm.DB) gin.H
- func GetHarvest(db *gorm.DB) gin.H
- func GetIncome(db *gorm.DB) gin.H
- func GetInvestment(db *gorm.DB) gin.H
- func GetLatestTransactions(db *gorm.DB) []transaction.Transaction
- func GetLedger(db *gorm.DB) gin.H
- func GetNetworth(db *gorm.DB) gin.H
- func GetPortfolioAllocation(db *gorm.DB) gin.H
- func GetPrices(db *gorm.DB) gin.H
- func GetRecurringTransactions(db *gorm.DB) gin.H
- func GetScheduleAL(db *gorm.DB) gin.H
- func GetTransactions(db *gorm.DB) gin.H
- func Listen(db *gorm.DB, port int)
- func SaveFile(db *gorm.DB, file LedgerFile) gin.H
- func Sync(db *gorm.DB, request SyncRequest) gin.H
- func ValidateFile(file LedgerFile) gin.H
- type AccountBudget
- type AccountGain
- type Aggregate
- type AllocationTarget
- type AllocationTargetConfig
- type Budget
- type CapitalGain
- type CashFlow
- type CommodityBreakdown
- type FYCapitalGain
- type Gain
- type Graph
- type HarvestBreakdown
- type Harvestable
- type Income
- type IncomeYearlyCard
- type InvestmentYearlyCard
- type Issue
- type LedgerFile
- type Level
- type Link
- type Networth
- type Node
- type Pair
- type PortfolioAggregate
- type PortfolioAllocationGroups
- type PortfolioDimension
- type PostingPair
- type Rule
- type ScheduleAL
- type ScheduleALEntry
- type ScheduleALSection
- type SyncRequest
- type Tax
- type TransactionSequence
- type TransactionSequenceKey
Constants ¶
View Source
const DATE_FORMAT string = "02 Jan 2006"
Variables ¶
View Source
var Sections []ScheduleALSection
Functions ¶
func DeleteBackups ¶ added in v0.3.2
func DeleteBackups(file LedgerFile) gin.H
func GetCurrentExpense ¶ added in v0.4.5
func GetFile ¶ added in v0.3.2
func GetFile(file LedgerFile) gin.H
func GetLatestTransactions ¶ added in v0.4.5
func GetLatestTransactions(db *gorm.DB) []transaction.Transaction
func ValidateFile ¶ added in v0.3.1
func ValidateFile(file LedgerFile) gin.H
Types ¶
type AccountBudget ¶ added in v0.4.8
type AccountBudget struct { Account string `json:"account"` Forecast decimal.Decimal `json:"forecast"` Actual decimal.Decimal `json:"actual"` Budgeted decimal.Decimal `json:"budgeted"` Rollover decimal.Decimal `json:"rollover"` Available decimal.Decimal `json:"available"` Date time.Time `json:"date"` Expenses []posting.Posting `json:"expenses"` }
type AccountGain ¶ added in v0.4.0
type AllocationTarget ¶ added in v0.1.3
type AllocationTargetConfig ¶ added in v0.1.3
type CapitalGain ¶ added in v0.2.2
type CapitalGain struct { Account string `json:"account"` TaxCategory string `json:"tax_category"` FY map[string]FYCapitalGain `json:"fy"` }
type CashFlow ¶ added in v0.4.2
type CashFlow struct { Date time.Time `json:"date"` Income decimal.Decimal `json:"income"` Expenses decimal.Decimal `json:"expenses"` Liabilities decimal.Decimal `json:"liabilities"` Investment decimal.Decimal `json:"investment"` Tax decimal.Decimal `json:"tax"` Checking decimal.Decimal `json:"checking"` Balance decimal.Decimal `json:"balance"` }
func GetCurrentCashFlow ¶ added in v0.4.5
type CommodityBreakdown ¶ added in v0.3.0
type CommodityBreakdown struct { ParentCommodityID string `json:"parent_commodity_id"` CommodityName string `json:"commodity_name"` SecurityName string `json:"security_name"` SecurityRating string `json:"security_rating"` SecurityIndustry string `json:"security_industry"` Percentage decimal.Decimal `json:"percentage"` SecurityID string `json:"security_id"` SecurityType string `json:"security_type"` Amount decimal.Decimal `json:"amount"` }
type FYCapitalGain ¶ added in v0.2.2
type HarvestBreakdown ¶ added in v0.2.2
type HarvestBreakdown struct { Units decimal.Decimal `json:"units"` PurchaseDate time.Time `json:"purchase_date"` PurchasePrice decimal.Decimal `json:"purchase_price"` CurrentPrice decimal.Decimal `json:"current_price"` PurchaseUnitPrice decimal.Decimal `json:"purchase_unit_price"` Tax taxation.Tax `json:"tax"` }
type Harvestable ¶ added in v0.2.2
type Harvestable struct { Account string `json:"account"` TaxCategory string `json:"tax_category"` TotalUnits decimal.Decimal `json:"total_units"` HarvestableUnits decimal.Decimal `json:"harvestable_units"` UnrealizedGain decimal.Decimal `json:"unrealized_gain"` TaxableUnrealizedGain decimal.Decimal `json:"taxable_unrealized_gain"` HarvestBreakdown []HarvestBreakdown `json:"harvest_breakdown"` CurrentUnitPrice decimal.Decimal `json:"current_unit_price"` CurrentUnitDate time.Time `json:"current_unit_date"` }
type IncomeYearlyCard ¶ added in v0.3.4
type InvestmentYearlyCard ¶ added in v0.3.4
type InvestmentYearlyCard struct { StartDate time.Time `json:"start_date"` EndDate time.Time `json:"end_date"` Postings []posting.Posting `json:"postings"` GrossSalaryIncome decimal.Decimal `json:"gross_salary_income"` GrossOtherIncome decimal.Decimal `json:"gross_other_income"` NetTax decimal.Decimal `json:"net_tax"` NetIncome decimal.Decimal `json:"net_income"` NetInvestment decimal.Decimal `json:"net_investment"` NetExpense decimal.Decimal `json:"net_expense"` SavingsRate decimal.Decimal `json:"savings_rate"` }
type LedgerFile ¶ added in v0.3.1
type Networth ¶ added in v0.4.5
type Networth struct { Date time.Time `json:"date"` InvestmentAmount decimal.Decimal `json:"investmentAmount"` WithdrawalAmount decimal.Decimal `json:"withdrawalAmount"` GainAmount decimal.Decimal `json:"gainAmount"` BalanceAmount decimal.Decimal `json:"balanceAmount"` NetInvestmentAmount decimal.Decimal `json:"netInvestmentAmount"` }
type PortfolioAggregate ¶ added in v0.3.0
type PortfolioAllocationGroups ¶ added in v0.4.0
type PortfolioAllocationGroups struct { Commomdities []string `json:"commodities"` NameAndSecurityType []PortfolioAggregate `json:"name_and_security_type"` SecurityType []PortfolioAggregate `json:"security_type"` Rating []PortfolioAggregate `json:"rating"` Industry []PortfolioAggregate `json:"industry"` }
func GetAccountPortfolioAllocation ¶ added in v0.4.0
func GetAccountPortfolioAllocation(db *gorm.DB, account string) PortfolioAllocationGroups
type PortfolioDimension ¶ added in v0.3.0
type PortfolioDimension struct { Group string GroupFn func(CommodityBreakdown) string SubGroup string SubGroupFn func(CommodityBreakdown) string FilterFn func(CommodityBreakdown, int) bool }
type PostingPair ¶ added in v0.2.6
type ScheduleAL ¶ added in v0.3.4
type ScheduleAL struct { Entries []ScheduleALEntry `json:"entries"` Date time.Time `json:"date"` }
type ScheduleALEntry ¶ added in v0.2.5
type ScheduleALEntry struct { Section ScheduleALSection `json:"section"` Amount decimal.Decimal `json:"amount"` }
type ScheduleALSection ¶ added in v0.2.5
type SyncRequest ¶ added in v0.3.0
type TransactionSequence ¶ added in v0.4.3
type TransactionSequence struct { Transactions []transaction.Transaction `json:"transactions"` Key TransactionSequenceKey `json:"key"` Interval int `json:"interval"` DaysSinceLastTransaction int `json:"days_since_last_transaction"` }
func ComputeRecurringTransactions ¶ added in v0.4.5
func ComputeRecurringTransactions(postings []posting.Posting) []TransactionSequence
type TransactionSequenceKey ¶ added in v0.4.3
type TransactionSequenceKey struct {
TagRecurring string `json:"tagRecurring"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.