Documentation
¶
Index ¶
- func GenerateReport(ctx *gin.Context)
- type AccountBalance
- func (a *AccountBalance) GetAccount() string
- func (a *AccountBalance) GetBalacePerMonth() *dataframe.DataFrame
- func (a *AccountBalance) GetCreditTx() *TransactionData
- func (a *AccountBalance) GetDebitTx() *TransactionData
- func (a *AccountBalance) GetTopTransactionStr(txType TransactionType, topNum int) (topTxStr string)
- func (a *AccountBalance) GetTotalBalance() float64
- func (a *AccountBalance) SendReport(receiverEmail string) error
- type ExtractRequest
- type TransactionData
- type TransactionDataframe
- type TransactionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateReport ¶
Types ¶
type AccountBalance ¶
type AccountBalance struct {
Account string
TotalBalance float64
BalacePerMonth *dataframe.DataFrame
DebitTx *TransactionData
CreditTx *TransactionData
}
func (*AccountBalance) GetAccount ¶
func (a *AccountBalance) GetAccount() string
GetAccount returns the account field
func (*AccountBalance) GetBalacePerMonth ¶
func (a *AccountBalance) GetBalacePerMonth() *dataframe.DataFrame
GetBalacePerMonth returns the dataframe with total balance per month
func (*AccountBalance) GetCreditTx ¶
func (a *AccountBalance) GetCreditTx() *TransactionData
GetCreditTx returns the credit transactions data
func (*AccountBalance) GetDebitTx ¶
func (a *AccountBalance) GetDebitTx() *TransactionData
GetDebitTx returns the debit transactions data
func (*AccountBalance) GetTopTransactionStr ¶
func (a *AccountBalance) GetTopTransactionStr(txType TransactionType, topNum int) (topTxStr string)
func (*AccountBalance) GetTotalBalance ¶
func (a *AccountBalance) GetTotalBalance() float64
GetTotalBalance returns the total balance field
func (*AccountBalance) SendReport ¶
func (a *AccountBalance) SendReport(receiverEmail string) error
type ExtractRequest ¶
type ExtractRequest struct {
Account string `json:"account" binding:"required"`
Year int `json:"year" binding:"required"`
ReceiverEmail string `json:"receiver_email" binding:"required"`
}
func (*ExtractRequest) GetAccount ¶
func (e *ExtractRequest) GetAccount() string
GetAccount returns the Account field
func (*ExtractRequest) GetReceiverEmail ¶
func (e *ExtractRequest) GetReceiverEmail() string
GetReceiverEmail returns the ReceiverEmail field
func (*ExtractRequest) GetYear ¶
func (e *ExtractRequest) GetYear() int
GetYear returns the Year field
type TransactionData ¶
func (*TransactionData) GetAverageTxValue ¶
func (t *TransactionData) GetAverageTxValue() float64
GetAverageTxValue returns the average transaction value
func (*TransactionData) GetTopTransactions ¶
func (t *TransactionData) GetTopTransactions() *dataframe.DataFrame
GetTopTransactions returns the dataframe with top transactions field
type TransactionDataframe ¶
type TransactionDataframe struct {
// contains filtered or unexported fields
}
func NewTransactionDF ¶
func NewTransactionDF(account, csvPath string, year int) (tx *TransactionDataframe, err error)
func (*TransactionDataframe) InsertData ¶
func (t *TransactionDataframe) InsertData() error
func (*TransactionDataframe) NewAccountBalance ¶
func (t *TransactionDataframe) NewAccountBalance() *AccountBalance
func (*TransactionDataframe) PreProcessData ¶
func (t *TransactionDataframe) PreProcessData()
type TransactionType ¶
type TransactionType int
const ( TransactionType_UNKNOWN TransactionType = iota TransactionType_DEBIT TransactionType_CREDIT )
Click to show internal directories.
Click to hide internal directories.