Documentation ¶
Overview ¶
Package interestvalue provides struct values and associated operations for interest calculations for each deposit in the bank, then for each bank and finally for all banks with 30day average earning
Index ¶
Constants ¶
View Source
const ( // Sa for aving type Sa = "Saving" // CD for cd type CD = "CD" // Ch gor checking type Ch = "Checking" // Br for Brokered type Br = "Brokered CD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bank ¶
type Bank struct { Name string `json:"name"` Deposits []Deposit `json:"deposits"` Delta float64 `json:"delta"` }
Bank is for output/response with Bank data and its deposists
type CreateInterestRequest ¶
type CreateInterestRequest struct {
NewBanks []NewBank `json:"banks"`
}
CreateInterestRequest is for input/request
func (CreateInterestRequest) CalculateDelta ¶
func (cireq CreateInterestRequest) CalculateDelta() (CreateInterestResponse, error)
CalculateDelta calculations for all banks
type CreateInterestResponse ¶
CreateInterestResponse is for output/response
type Deposit ¶
type Deposit struct { Account string `json:"account"` AccountType string `json:"annualType"` APY float64 `json:"annualRate%"` Years float64 `json:"years"` Amount float64 `json:"amount"` Delta float64 `json:"delta"` }
Deposit is for output/reponse with Deposit data
type NewBank ¶
type NewBank struct { Name string `json:"name"` NewDeposits []NewDeposit `json:"deposits"` }
NewBank is for input/request with Bank data and its deposits
Click to show internal directories.
Click to hide internal directories.