This little API follows the requirements of the task suggested by FullCycle in the GoExpert course.
The task is:
Olá devs!
Agora é a hora de botar a mão na massa. Pra este desafio, você precisará criar o usecase de listagem das orders.
Esta listagem precisa ser feita com:
- Endpoint REST (GET /order)
- Service ListOrders com GRPC
- Query ListOrders GraphQL
Não esqueça de criar as migrações necessárias e o arquivo api.http com a request para criar e listar as orders.
- You need to have installed locally:
-
Clone/download the repository to a local folder;
-
Via terminal(command line), access the cloned repository folder;
-
Run this command in the source folder to start the MySql database and the Rabbit messager:
docker-compose up -d
OBS: The database already upload the table and a record in the table
-
Access the folder
cmd/ordersystemand start the API:cd cmd/ordersystem/go run .ORgo run main.go wire_gen.go
-
Just access the following endpoint or run the
list_orders.httpfile in the folder/api:http://localhost:8000/list-orders
-
Access the Evans CLI and call the the records using the
ListOrdersmethodevans -r replcall ListOrders
-
Access the following endpoint and write the next query to see the records
http://localhost:8080query listOrders { orders { id Price Tax FinalPrice } }



