Skip to content

col3name/balance-service

Repository files navigation

Service for working with user balance

Ci passing Coverage

TODO

  • Write test
  • Setup Github CI

Requirements

make, docker, docker-compose

optional

golangci-lint, apache benchmark, newman, go-cleanarch

setup data create table from file data\postgres\migrations\init.sql insert data from file data\postgres\migrations\payment_public_account.sql

make bin/money
make up

server running on localhost:8000 swagger ui running on localhost:80

Use cases

  • Get the user's current balance.
  • Get the transaction history of the account.
  • Transfer funds from user to user.
  • Debit or credit of funds from account.
  • Converting balance to other currencies.

Improvments

  • Use Credit/Debit transaction account, Transaction(id, account_id uuid, credit int, debit int, desc: string)

Database UML

cursor

Pagination when sorting by date is implemented via the cursor to optimize the OFFSET operation

The user rarely looks at the entire transaction history when sorting by any gender. Therefore, it is possible to save data for users and update it during financial transactions.

cursor cursor

Improvements in architecture to increase fault tolerance

cursor cursor

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages