Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/renatospaka/payment-transaction


https://github.com/renatospaka/payment-transaction

chi-router clean-architecture clean-code ddd docker docker-compose golang grpc-client postgres protocol-buffers rest-api

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        

# Cred-System Interview Challenge

## Using for this challenge:
- Postgres database
- gRPC
- REST

## Standards
golang standards - project layout
Uber style guide for golang

## go have fun using Go ->
Case Studies

## Using the App
- docker-compose up --build at the root of the app
- in a PostgreSQL client, manually execute the script (copy, paste & run) ./migration/CREATE _TRANSACTION.sql
- in a http client, execute the routes:
-- HEALTH
curl --request GET \
--url http://localhost:3150/health
-- POST
curl --request POST \
--url http://localhost:3150/transactions \
--header 'Content-Type: application/json' \
--data '{
"client_id": "{uuid}",
"value": {float}
}'
-- GET
curl --request GET \
--url http://localhost:3150/transactions/{uuid} \
--header 'Content-Type: application/json'
-- DELETE
curl --request DELETE \
--url http://localhost:3150/transactions/{uuid} \
--header 'Content-Type: application/json'
-- UPDATE
curl --request PUT \
--url http://localhost:3150/transactions/{uuid} \
--header 'Content-Type: application/json' \
--data '{
"value": {float}
}'