GoBank is a Go project that provides a simple banking API.
- Go version 1.x
- Docker and Docker Compose
Clone the repository:
git clone https://github.com/<your-username>/gobank.git
Install the dependencies:
make deps
To run the project, use the command:
make run
To run the tests, use the command:
make test
- Description: Authenticates a user and returns a JWT token.
- Parameters: JSON body with
Number
andPassword
. - Response: JSON with
Token
andNumber
.
- Description: Retrieves all accounts.
- Parameters: None.
- Response: JSON array of accounts.
- Description: Creates a new account.
- Parameters: JSON body with
FirstName
,LastName
, andPassword
. - Response: JSON of the created account.
- Description: Retrieves an account by its ID.
- Parameters:
id
in the URL path. - Response: JSON of the requested account.
- Description: Deletes an account by its ID.
- Parameters:
id
in the URL path. - Response: JSON with
deleted
field containing the ID of the deleted account.
- Description: Initiates a transfer between accounts.
- Parameters: JSON body with details of the transfer.
- Response: JSON of the transfer request.
Contributions are very welcome! If you'd like to contribute, these are the steps:
- Fork the repository.
- Create a new branch in your forked repository.
- Make your changes in the new branch.
- Submit a pull request from the new branch in your forked repository to the main branch in the original repository.
This project is licensed under the MIT License - see the LICENSE file for details.