Used to store wallet & transaction data
Used to store tokens as key and wallet id as value
Also provide distributed lock (in case locks are being used in multiple pod/machine) to prevent race condition on deposits and withdrawal
Redlock (implemented with redsync) also provide TTL for each lock to prevent deadlock.\
- Clone this repository
- Make sure you have docker installed on your machine
- Get in to the directory
cd mini-wallet - Run
docker-compose up - Open new terminal and run
docker exec -it mini-wallet sh - Once you are already in the container shell, run this command:
cd /go/src/mini-wallet && go install github.com/pressly/goose/v3/cmd/goose@v3.15.0 && export PATH="$PATH:$HOME/go/bin"&& goose -dir infrastructure/migrations postgres "host=postgres port=5432 user=postgres password=postgres dbname=mini-wallet sslmode=disable" up