Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConverterMap = map[BankAccountType]ConverterFunc{ // contains filtered or unexported fields }
ConverterMap maps bank account types to their respective ConverterFunc.
Functions ¶
This section is empty.
Types ¶
type BankAccountType ¶
type BankAccountType string
BankAccountType is an enum for the type of bank accounts.
func InferAccountType ¶
func InferAccountType(account string) (BankAccountType, error)
InferAccountType accepts an account name and infers its type.
type ConverterFunc ¶
type ConverterFunc func(csvContent [][]string) ([]*TransactionDoc, error)
ConverterFunc represents a function that converts CSV bank statements into a list of transaction documents. It can be implemented differently for each bank as per their statement format.
type TransactionDoc ¶
type TransactionDoc struct {
AccountName string `json:"account_name"`
Amount float64 `json:"amount"`
Timestamp time.Time `json:"timestamp"`
RefNum string `json:"bank_ref_num"`
PaymentMode string `json:"payment_mode"`
Remarks string `json:"remarks"`
}
TransactionDoc represents a bank agnostic transaction document.
Click to show internal directories.
Click to hide internal directories.