actions

package
v0.0.0-...-07f2725 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCryptoToWallet

func AddCryptoToWallet(UUID string, symbol string, amount float64)

func AddMoneyToWallet

func AddMoneyToWallet(UUID string, amount float64)

func AddRefreshToken

func AddRefreshToken(tkn *models.RefreshTokenModel)

func AddTrade

func AddTrade(from string, to string, walletUUID string, price float64, amount float64)

func CheckIfCurrencyExists

func CheckIfCurrencyExists(name string) bool

func CheckUserOwnsRefreshToken

func CheckUserOwnsRefreshToken(user string, token string) bool

func Connect

func Connect() (*sql.DB, error)

func GetAllCurrencys

func GetAllCurrencys() []models.CurrencyModel

func GetAllTradesForUser

func GetAllTradesForUser(UUID string) []models.TradesModel

func GetAmountOfCryptoByUUID

func GetAmountOfCryptoByUUID(UUID string, symbol string) float64

func GetCurrency

func GetCurrency(name string) models.CurrencyModel

func GetCurrencyArray

func GetCurrencyArray(UUID string) []models.CurrencyArrayModel

func GetCurrencyData

func GetCurrencyData(name string, timePeriod int) []models.CurrencyProgressModel

---------------------------------

         DEPRECATED
 This action is deprecated
It can be enabled via config

---------------------------------

func GetRefreshToken

func GetRefreshToken(token string) (bool, models.RefreshTokenModel)

func GetUserByUsername

func GetUserByUsername(username string) models.UserModel

func GetWalletByUUID

func GetWalletByUUID(UUID string) models.WalletModel

func InitTables

func InitTables()

func InsertCurrency

func InsertCurrency(
	coinid string, rank int, symbol string, name string, supply float64, maxSupply float64, marketCapUSD float64,
	volumeUSD24Hr float64, priceUSD float64, changePercent24Hr float64, vwap24Hr float64)

func InsertCurrencyChange

func InsertCurrencyChange(currency string, priceUSD float64, timestamp int)

-----------------------------------------

          DEPRECATED
This function is handled anyway.
It is deprecated since v0.0.1-dev

-----------------------------------------

func Login

func Login(username string, password string) bool

func LoginWithToken

func LoginWithToken(username string, token string) bool

func RegisterAccount

func RegisterAccount(username string, password string) bool

func RemoveCryptoFromWallet

func RemoveCryptoFromWallet(UUID string, symbol string, amount float64)

func RemoveMoneyFromWallet

func RemoveMoneyFromWallet(UUID string, value float64)

func RevokeSession

func RevokeSession(user string, token string)

func SetUserAuthToken

func SetUserAuthToken(username string, token string)

func UpdateCurrency

func UpdateCurrency(
	rank int, supply float64, maxSupply float64, marketCapUSD float64, VolumeUSD24Hr float64, priceUSD float64,
	changePercent24Hr float64, vwap24Hr float64, symbol string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL