Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidMidata is returned when data // does not match the expected midata format. ErrInvalidMidata = errors.New("invalid midata format") )
Functions ¶
This section is empty.
Types ¶
type Midata ¶
type Midata struct { Transactions Transactions Overdraft Overdraft }
Midata holds midata information
func (*Midata) DaysInOverdraft ¶
DaysInOverdraft will return the total number of days with a negative balance.
func (*Midata) TotalExpenses ¶
TotalExpenses will return the total amount of debit for the account.
func (*Midata) TotalIncome ¶
TotalIncome will return the sum of credit for the account.
type Transaction ¶
type Transaction struct { Date time.Time Type string Merchant string Debit decimal.Decimal Balance decimal.Decimal }
Transaction is a single entry in a midata file
type Transactions ¶
type Transactions []*Transaction
Transactions are held in a midata file
func (Transactions) Len ¶
func (t Transactions) Len() int
func (Transactions) Less ¶
func (t Transactions) Less(i, j int) bool
func (Transactions) Swap ¶
func (t Transactions) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.