Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Budget ¶
type Budget struct { BudgetMetaData struct { CurrencyLocale language.Tag `json:"currencyLocale"` } `json:"budgetMetaData"` Transactions []Transaction `json:"transactions"` MonthlyBudgets []MonthlyBudget `json:"monthlyBudgets"` Categories []Category `json:"masterCategories"` ScheduledTransactions []ScheduledTransaction `json:"scheduledTransactions"` Payees []Payee `json:"payees"` Accounts []Account `json:"accounts"` }
This has been converted from testdata/importer/Budget.yfull with the help of https://mholt.github.io/json-to-go/
Unused fields have been removed to keep the struct as small as possible.
type Category ¶
type Category struct { SubCategories []SubCategory `json:"subCategories"` EntityID string `json:"entityId"` Name string `json:"name"` Note string `json:"note"` Deleted bool `json:"isTombstone"` }
type IDToEnvelope ¶
type IDToEnvelopes ¶
type IDToEnvelopes map[string]IDToEnvelope
IDToEnvelopes maps the ID of a YNAB 4 subcategory to a category and envelope name for Envelope Zero.
type IDToName ¶
IDToName is a map of strings to a string.
Use it to map the YNAB 4 Entity IDs to the names to enable easier mapping.
type MonthlyBudget ¶
type MonthlyBudget struct { Month string `json:"month"` MonthlySubCategoryBudgets []MonthlySubCategoryBudget `json:"monthlySubCategoryBudgets"` }
type Payee ¶
type Payee struct { EntityID string `json:"entityId"` Name string `json:"name"` RenameConditions []RenameCondition `json:"renameConditions"` // Currently unused, will be relevant for future renaming features in EZ }
type RenameCondition ¶
type ScheduledTransaction ¶
type ScheduledTransaction struct { TwiceAMonthStartDay int `json:"twiceAMonthStartDay"` Amount decimal.Decimal `json:"amount"` Frequency string `json:"frequency"` AccountID string `json:"accountId"` TargetAccountID string `json:"targetAccountId"` // Used for transfers CategoryID string `json:"categoryId"` Date string `json:"date"` Accepted bool `json:"accepted"` PayeeID string `json:"payeeId"` EntityVersion string `json:"entityVersion"` Cleared string `json:"cleared"` Memo string `json:"memo"` Flag string `json:"flag"` }
TODO: Clean up when implementing https://github.com/envelope-zero/backend/issues/379
type SubCategory ¶
type Transaction ¶
type Transaction struct { EntityID string `json:"entityId"` Amount decimal.Decimal `json:"amount"` CategoryID string `json:"categoryId"` Date string `json:"date"` Memo string `json:"memo"` Deleted bool `json:"isTombstone"` PayeeID string `json:"payeeId"` AccountID string `json:"accountId"` Cleared string `json:"cleared"` Flag string `json:"flag"` // Currently unused, will be relevant for tagging: https://github.com/envelope-zero/backend/issues/20 TargetAccountID string `json:"targetAccountId"` SubTransactions []struct { CategoryID string `json:"categoryId"` Amount decimal.Decimal `json:"amount"` Memo string `json:"memo"` TargetAccountID string `json:"targetAccountId"` } `json:"subTransactions"` }
Click to show internal directories.
Click to hide internal directories.