Skip to content

Project for Back-end Engineer (AnyLogi/Golang) at AnyMind Group

Notifications You must be signed in to change notification settings

katsuragawaa/btc-billionaire

Repository files navigation

BTC Billionaire AnyMind Project

👨‍💻 List of what has been used:


🚀 Docker-compose files:

# run postgresql
docker-compose.local.yml 

# run docker development environment
docker-compose.dev.yml 

🗄️ Migrations:

Install the golang-migrate CLI

# create the database
make migrate_up

# drop the database
make migrate_down

📦 Docker development usage:

make docker

📍 Recommendation for local development:

# run all containers
make local 

# it's easier way to attach debugger or rebuild/rerun project
make run 

API

SWAGGER UI:

http://localhost:8080/swagger/index.html

Send bitcoin

curl --location --request POST 'http://localhost:8080/api/v1/transactions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "datetime": "2022-12-31T15:00:00+03:00",
    "amount": 10
}'

Get transactions per hour

curl --location --request GET \
'http://localhost:8080/api/v1/transactions?startDatetime=2022-01-01T18:00:00-05:00&endDatetime=2023-12-31T21:00:00+08:00'

Get total balance

curl --location --request GET 'http://localhost:8080/api/v1/transactions/balance' 

Client

There's a mock client that sends a random amount of bitcoin from a random place (timezone) each second

make client

About

Project for Back-end Engineer (AnyLogi/Golang) at AnyMind Group

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published