BTC Billionaire AnyMind Project
- echo - Web framework
- sqlx - Extensions to database/sql
- pgx - PostgreSQL driver and toolkit for Go
- viper - Go configuration with fangs
- zap - Logger
- validator - Go Struct and Field validation
- uuid - UUID
- migrate - Database migrations. CLI and Golang library
- swag - Swagger
- testify - Testing toolkit
- gomock - Mocking framework
- CompileDaemon - Compile daemon for Go
- Docker - Docker
- Github Actions - Automate workflow
# run postgresql
docker-compose.local.yml
# run docker development environment
docker-compose.dev.yml
Install the golang-migrate CLI
# create the database
make migrate_up
# drop the database
make migrate_down
make docker
# run all containers
make local
# it's easier way to attach debugger or rebuild/rerun project
make run
http://localhost:8080/swagger/index.html
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
}'
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'
curl --location --request GET 'http://localhost:8080/api/v1/transactions/balance'
There's a mock client that sends a random amount of bitcoin from a random place (timezone) each second
make client