- Postgres
- Docker
- Gin
- golang-migrate
- sqlc
- testify
- PASETO Security Tokens
- jwt-go
- Clone the repository
- Go to the project's root directory
- Rename
app.env.sample
toapp.env
and replace the values - Run in your terminal:
docker-compose up --build
to run the containers
- Now everything should be ready and the server running on
SERVER_ADDRESS
specified in app.env
- Run the containers (database container is sufficient)
- Run in your terminal:
make test
ormake test_coverage p={PATH}
- to get the coverage in the HTML format - where{PATH}
is the path to the target directory for which you want to generate test coverage. The{PATH}
should be replaced with the actual path you want to use. For example./api
or- simply use
go test
commands
/users
- handles POST requests to create users/users/login
- handles POST requests to log in users/tokens/renew
- handles POST requests to renew the access tokens
/accounts
- handles POST requests to create accounts/accounts
- handles GET requests to get all accounts/accounts/{id}
- handles GET requests to get account details/accounts/{id}
- handles DELETE requests to delete an account
/transfers
- handles POST requests to transfer money from one account to another
After running the server, the API (HTTP gateway) documentation can be found at http://localhost:8080/docs/
The database's schema and intricate details can be found on
dedicated webpage, which provides a comprehensive overview
of the data structure, tables, relationships, and other essential
information. To explore the database further, please visit
this dbdocs.io webpage.
Password: bankgopassword