https://github.com/guilhermecostam/sys-finance
Simple API for transaction maintenance. Developed to study the GO language.
https://github.com/guilhermecostam/sys-finance
api finance golang http web
Last synced: 8 days ago
JSON representation
Simple API for transaction maintenance. Developed to study the GO language.
- Host: GitHub
- URL: https://github.com/guilhermecostam/sys-finance
- Owner: guilhermecostam
- License: mit
- Created: 2022-05-13T01:10:46.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T02:43:54.000Z (about 4 years ago)
- Last Synced: 2024-06-19T23:04:07.150Z (almost 2 years ago)
- Topics: api, finance, golang, http, web
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sys-finance
Simple API for transaction maintenance. Developed to study the GO language.
## Features
These are the features I used in developing this project.
- **Golang** — Open-source and compiled language.
- [**Goose**](https://github.com/pressly/goose) — Open-source lib for create migrations in GO.
- **Docker Compose** — Docker's container orchestrator.
- **Postgres** — Relational database.
## Getting started
```bash
# Clone this repository
$ git clone https://github.com/guilhermecostam/sys-finance.git
# Create your .env file and overwrite
$ cp .env.example .env
# Run docker compose
$ docker-compose up -d
# Go to migrations path and run the migration
$ cd database/migrations && goose up
# Now, go to server main file and run the application
$ cd .. && cd cmd && go run .
```
## Access to the API
All requests to the API begin with:
```shell
localhost:8080/transactions
```
- For receive all results of transactions, just send this endpoint with the **GET** method.
- For create a transaction, just send this endpoint with the **POST** method and the required requests.
Now, for calls using a specific transaction, it is necessary to send an ID in the scope of the endpoint:
```shell
localhost:8080/transactions/{$transactionId}
```
- For receive a especific transaction, just send this endpoint with the **GET** method.
- For update a especific transaction, just send this endpoint with the **PUT** method.
- For delete a especific transaction, just send this endpoint with the **DELETE** method.
## How to contribute
Do you want to contribute to the project? Just follow these instructions:
- Fork this repository;
- Clone your repository;
- Create a branch with your feature:
`
git checkout -b my-feature
`;
- Commit your changes:
`
git commit -m 'feat: My new feature'
`;
- Push to your branch:
`
git push origin my-feature
`;
- Come in Pull Requests from the original project and create a pull request with your commit;
After the merge of your pull request is done, you can delete your branch.
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/guilhermecostam/sys-finance/blob/master/LICENSE) page for details.
---
Made with :zap: by Guilherme Costa. [Get in touch!](https://www.linkedin.com/in/guilhermecostam/)