https://github.com/roblesdotdev/go-rest-api
Production ready golang REST API.
https://github.com/roblesdotdev/go-rest-api
Last synced: over 1 year ago
JSON representation
Production ready golang REST API.
- Host: GitHub
- URL: https://github.com/roblesdotdev/go-rest-api
- Owner: roblesdotdev
- Created: 2024-02-14T18:43:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-17T21:12:53.000Z (over 2 years ago)
- Last Synced: 2025-01-13T19:52:04.001Z (over 1 year ago)
- Language: Go
- Size: 43 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO REST API
Production ready golang REST API.
## Architecture
```
+-------------+ +-------------+ +-------------+
--->| HTTP | ---> | Service | ---> | Repository | ---> DB(postgres)
+-------------+ +-------------+ +-------------+
```
1. **HTTP (Hypertext Transfer Protocol)**
- This component represents the presentation layer or the user interface. It receives requests from clients and routes them to the appropriate service for processing.
2. **Service**
- The service is responsible for business logic and coordination between different parts of the system. It receives requests from the HTTP component, performs necessary operations, and may interact with the data repository to retrieve or modify information.
3. **Repository**
- The repository represents the data access layer. It is responsible for interacting with persistent storage, such as databases or file systems. The service uses the repository to perform CRUD (Create, Read, Update, Delete) operations on the data.