-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.go
161 lines (145 loc) · 5.2 KB
/
settings.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// Written 2016 by Marcin 'Zbroju' Zbroinski.
// Use of this source code is governed by a GNU General Public License
// that can be found in the LICENSE file.
package cli
// Settings
const (
FSSeparator = " "
NullDataValue = "-"
)
// Headings for displaying data and reports
const (
HCId = "ID"
HCName = "CATEGORY"
HMCId = "ID"
HMCType = "TYPE"
HMCName = "MAINCAT"
HMCStatus = "STATUS"
HCurF = "CUR_FR"
HCurT = "CUR_TO"
HCurRate = "EX.RATE"
HAId = "ID"
HAName = "ACCOUNT"
HADescription = "DESCRIPTION"
HAInstitution = "BANK"
HACurrency = "CUR"
HAType = "TYPE"
HAStatus = "STATUS"
HTId = "ID"
HTDate = "DATE"
HTValue = "VALUE"
HTDescription = "DESCRIPTION"
HBPeriod = "PERIOD"
HBLimit = "LIMIT"
HBCurrency = "CUR"
HBDifference = "DIFFERENCE"
HIncome = "INCOME"
HCost = "COST"
HDifference = "DIFFERENCE"
HNV = "NET VALUE"
)
// Errors
const (
errMissingFileFlag = "missing information about data file"
errMissingIDFlag = "missing ID"
errMissingCategoryFlag = "missing category name"
errMissingCategorySplitFlag = "missing category split name"
errMissingMainCategoryFlag = "missing main category name"
errMissingCurrencyFlag = "missing currency (from) name"
errMissingCurrencyToFlag = "missing currency_to name"
errMissingExchangeRateFlag = "missing exchange rate"
errMissingAccountFlag = "missing account name"
errIncorrectAccountType = "incorrect account type"
errMissingDescriptionFlag = "missing description"
errMissingValueFlag = "missing value"
errMissingPeriodFlag = "missing period"
)
// Commands, objects and options
const (
CmdInit = "init"
CmdInitAlias = "I"
CmdAdd = "add"
CmdAddAlias = "A"
CmdEdit = "edit"
CmdEditAlias = "E"
CmdRemove = "delete"
CmdRemoveAlias = "D"
CmdList = "list"
CmdListAlias = "L"
CmdReport = "report"
CmdReportAlias = "R"
OptFile = "file"
OptFileAlias = "f"
OptAll = "all"
OptMainCategoryType = "main-category-type"
OptMainCategoryTypeAlias = "o"
OptID = "id"
OptIDAlias = "i"
OptCurrency = "currency"
OptCurrencyAlias = "j"
OptCurrencyTo = "currency-to"
OptCurrencyToAlias = "k"
OptDescription = "description"
OptDescriptionAlias = "s"
OptInstitution = "bank"
OptInstitutionAlias = "b"
OptAccountTo = "account-to"
OptCategorySplit = "split-category"
OptCategorySplitAlias = "x"
OptAccountType = "accout-type"
OptAccountTypeAlias = "p"
OptValue = "value"
OptValueAlias = "v"
OptDate = "date"
OptDateAlias = "d"
OptDateFrom = "date-from"
OptDateTo = "date-to"
OptPeriod = "period"
OptPeriodAlias = "e"
ObjAccount = "account"
ObjAccountAlias = "a"
ObjCategory = "category"
ObjCategoryAlias = "c"
ObjMainCategory = "main_category"
ObjMainCategoryAlias = "m"
ObjExchangeRate = "rate"
ObjExchangeRateAlias = "r"
ObjTransaction = "transaction"
ObjTransactionAlias = "t"
ObjBudget = "budget"
ObjBudgetAlias = "b"
ObjCompoundTransfer = "transfer"
ObjCompoundTransferAlias = "T"
ObjCompoundInternalCost = "internal-cost"
ObjCompoundInternalCostAlias = "C"
ObjCompoundTransactionSplit = "transaction-split"
ObjCompoundTransactionSplitAlias = "S"
ObjReportAccountBalance = "account-balance"
ObjReportAccountBalanceAlias = "ab"
ObjReportBudgetCategories = "budget-categories"
ObjReportBudgetCategoriesAlias = "bc"
ObjReportBudgetMainCategories = "budget-main-categories"
ObjReportBudgetMainCategoriesAlias = "bmc"
ObjReportTransactionBalance = "transaction-balance"
ObjReportTransactionBalanceAlias = "tb"
ObjReportCategoryBalance = "category-balance"
ObjReportCategoryBalanceAlias = "cb"
ObjReportCategoryBalanceMonthly = "category-balance-monthly"
ObjReportCategoryBalanceMonthlyAlias = "cbm"
ObjReportCategoryBalanceYearly = "category-balance-yearly"
ObjReportCategoryBalanceYearlyAlias = "cby"
ObjReportMainCategoryBalance = "main-category-balance"
ObjReportMainCategoryBalanceAlias = "mcb"
ObjReportMainCategoryBalanceMonthly = "main-category-balance-monthly"
ObjReportMainCategoryBalanceMonthlyAlias = "mcbm"
ObjReportMainCategoryBalanceYearly = "main-category-balance-yearly"
ObjReportMainCategoryBalanceYearlyAlias = "mcby"
ObjReportAssetsSummary = "assets-summary"
ObjReportAssetsSummaryAlias = "as"
ObjReportNetValueMonthly = "net-value"
ObjReportNetValueMonthlyAlias = "nv"
ObjReportIncomeVsCostMonthly = "income-cost-monthly"
ObjReportIncomeVsCostMonthlyAlias = "icm"
ObjReportIncomeVsCostYearly = "income-cost-yearly"
ObjReportIncomeVsCostYearlyAlias = "icy"
)