package
0.0.0-20230823174623-d24b61010a27
Repository: https://github.com/brianhersh/cen-project.git
Documentation: pkg.go.dev
# README
blank
# Functions
Handles the websocket connection to Finnhub API.
No description provided by the author
No description provided by the author
No description provided by the author
Gets the difference between the avg purchase price * shares and current purchase price * shares.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
this returns slices of information in the format of the above struct.
GetUserFunds is protected and user must be logged in to get the user funds.
No description provided by the author
Gets value of portfolio based on stock price * shares owned + funds.
No description provided by the author
No description provided by the author
Initializes tables if necessary.
JWTPathProtection This handler can be applied to anything that requires the user to log in.
Http status meanings in this function:
400 - Username not found
401 - Ticker not found
402 - Share quantity is not in range 1-50
403 - Not enough funds for the purchase
*/.
No description provided by the author
No description provided by the author
No description provided by the author
Http status meanings in this function:
404 - Username not found
405 - Ticker not found
406 - User doesn't any shares of the stock he wants to sell
407 - Invalid shares quantity input
408 - User trying to sell more shares than he owns
*/.
No description provided by the author
# Constants
local db connection -(fill in password and remove "<>", create "godb" schema in your database).
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
To keep track of history - a log book essentially.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
For keeping track of stocks a user owns.