Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/renatospaka/payment-transaction
- Owner: renatospaka
- Created: 2023-06-11T02:42:47.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2023-07-25T00:41:53.000Z (over 1 year ago)
- Last Synced: 2024-06-21T15:40:25.735Z (5 months ago)
- Topics: chi-router, clean-architecture, clean-code, ddd, docker, docker-compose, golang, grpc-client, postgres, protocol-buffers, rest-api
- Language: Go
- Homepage:
- Size: 228 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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}
}'