Documentation ¶
Index ¶
- Variables
- func FetchMonzoTransactions(cfg config.Config, cache cache.CacheManager, monzo oauth.AuthProvider)
- func FetchSplitwiseExpenses(cache cache.CacheManager, splitwise oauth.AuthProvider)
- func FirstDayOfISOWeek(year int, week int, timezone *time.Location) time.Time
- func GetLocation(date time.Time) *time.Location
- func GetStats(exps []GroupedExpenses, grandTotal bool) (float64, float64)
- type ByWeek
- type Expense
- type GroupedExpenses
- type SplitwiseExpense
- type SplitwiseExpenses
- type Transaction
- type Transactions
Constants ¶
This section is empty.
Variables ¶
View Source
var ColombianosGid = "11862121"
View Source
var JointAccountId = "acc_00009Yx2VDcMTatdAVTu0P"
View Source
var QuitoCatsGid = "11593186"
View Source
var SudamericaGid = "7786790"
Functions ¶
func FetchMonzoTransactions ¶
func FetchMonzoTransactions(cfg config.Config, cache cache.CacheManager, monzo oauth.AuthProvider)
func FetchSplitwiseExpenses ¶
func FetchSplitwiseExpenses(cache cache.CacheManager, splitwise oauth.AuthProvider)
func FirstDayOfISOWeek ¶
Types ¶
type ByWeek ¶
type ByWeek struct { Week int StartDate time.Time EndDate time.Time Days []GroupedExpenses Mean float64 }
func GetExpensesByWeek ¶
func GetExpensesByWeek(exps []GroupedExpenses) []ByWeek
type Expense ¶
type Expense struct { Id string `json:"id"` CreatedAt time.Time `json:"created"` Amount float64 `json:"amount"` LocalAmount float64 `json:"local_amount"` LocalCurrency string `json:"local_currency"` Description string `json:"description"` Notes string `json:"notes"` }
func GetExps ¶
func GetExps(cfg config.Config, cache cache.CacheManager, monzo oauth.AuthProvider, splitwise oauth.AuthProvider) []Expense
func HandleCash ¶
func HandleNights ¶
func (Expense) TestString ¶
type GroupedExpenses ¶
func GetAllExpenses ¶
func GetAllExpenses(cfg config.Config, cache cache.CacheManager, monzo oauth.AuthProvider, splitwise oauth.AuthProvider) []GroupedExpenses
type SplitwiseExpense ¶
type SplitwiseExpense struct { Id int `json:"id"` Gid int `json:"group_id"` CreatedAt time.Time `json:"date"` Cost string `json:"cost"` Description string `json:"description"` Details string `json:"details"` DeletedAt time.Time `json:"deleted_at"` Users []struct { UserId int `json:"user_id"` Share string `json:"owed_share"` } `json:"users"` }
type SplitwiseExpenses ¶
type SplitwiseExpenses struct {
Expenses []SplitwiseExpense `json:"expenses"`
}
func GetSplitwiseExpenses ¶
func GetSplitwiseExpenses(cache cache.CacheManager, splitwise oauth.AuthProvider) SplitwiseExpenses
type Transaction ¶
type Transaction struct { Id string `json:"id"` CreatedAt time.Time `json:"created"` Amount int `json:"amount"` Merchant struct { Id string `json:"id"` Name string `json:"name"` } `json:"merchant"` Description string `json:"Description"` Notes string `json:"notes"` LocalAmount int `json:"local_amount"` LocalCurrency string `json:"local_currency"` IncludeInSpending bool `json:"include_in_spending"` Metadata struct { MastercardApprovalType string `json:"mastercard_approval_type,omitempty"` } `json:"metadata"` Settled string `json:"settled,omitempty"` }
type Transactions ¶
type Transactions struct {
Transactions []Transaction
}
func GetMonzoTransactions ¶
func GetMonzoTransactions(cfg config.Config, cache cache.CacheManager, monzo oauth.AuthProvider) Transactions
Click to show internal directories.
Click to hide internal directories.