package
0.0.0-20240814010835-9fc48a241e25
Repository: https://github.com/surahman/ftex.git
Documentation: pkg.go.dev
# Functions
HTTPCryptoBalance retrieves a balance for a specific Crypto account.
HTTPCryptoBalancePaginated retrieves a page of data from the Cryptocurrency account balances and prepares a link to the next page of data.
HTTPCryptoOffer will request the conversion rate, prepare the price quote, and store it in the Redis cache.
HTTPCryptoOpen opens a Crypto account.
HTTPCryptoTransactionsPaginated will retrieve a page of Cryptocurrency transactions based on a time range.
HTTPDeleteUser validates a JWT token and issues a fresh token.
HTTPExchangeCrypto will complete a Cryptocurrency exchange.
HTTPFiatBalance retrieves the account balance for a specific Fiat currency.
HTTPFiatBalancePaginated will retrieve a page of all Fiat account balances.
HTTPFiatBalancePaginatedRequest will convert the encrypted URL query parameter for the currency and the record limit and covert them to a currency and integer record limit.
HTTPFiatDeposit deposits a valid amount into a Fiat account.
HTTPFiatOffer retrieves an exchange rate offer from a quote provider and stores it in the Redis session cache.
HTTPFiatOpen opens a Fiat account.
HTTPFiatTransactionsPaginated will retrieve a page of all Fiat transactions for a specific account and period.
HTTPFiatTransfer will retrieve an offer from the session cache, validate it, then update the database.
HTTPGenerateTestUsers will generate a number of test users for testing.
HTTPGetCachedOffer will retrieve and then evict an offer from the Redis cache.
HTTPHealthcheck checks if the service is healthy by pinging the data tier comprised of Postgres and Redis.
HTTPLoginUser will complete a login request for a user.
HTTPRefreshLogin validates a JWT token and issues a fresh token.
HTTPRegisterUser will create a row in the database's users' table corresponding to a new user.
HTTPTransactionGeneratePageCursor will generate the encrypted page cursor.
HTTPTransactionInfoPaginatedRequest will generate the month bounds and record limits using supplied query parameters.
HTTPTransactionUnpackPageCursor will unpack an encrypted page cursor to its component parts.
HTTPTxDetails will retrieve the Cryptocurrency journal entries for a specified transaction.
HTTPTxParseQueryParams will parse the HTTP request input parameters in database query parameters for the paginated Fiat/Crypto transactions requests.
HTTPValidateOfferRequest will validate an offer request by checking the amount and Fiat currencies are valid.
# Structs
HTTPPaginatedTxParams contains the HTTP request as well as the database query parameters.