Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLoan ¶
CreateLoan inputs a new loan into the database Route: POST /loans
func DeleteLoan ¶
DeleteLoan deletes the loan entry from the db Route: DELETE /loan/:id
func FindLoan ¶
FindLoan connects to the database and retrieves a single loan, by id Route: GET /loans/:id
func FindLoans ¶
FindLoans connects to the database and retrieves all loans inside of it Route: GET /loans
func UpdateLoan ¶
UpdateLoan updates a loan by id. All fields are optional Route: PUT /loans/:id
Types ¶
type CreateLoanInput ¶
type CreateLoanInput struct { LoanName string `json:"loan_name" binding:"required"` Debt float32 `json:"debt" binding:"required"` InterestRate float32 `json:"interest_rate" binding:"required"` }
A CreateLoanInput respresents the required input from the user to input a new loan
Click to show internal directories.
Click to hide internal directories.