-
This is a simple CRUD API for products
-
It is built with the Go-Gin framework and uses the RESTful API architecture.
-
The application is dockerized using Docker Compose for easy deployment.
-
It uses pagination with params like so
Key | Value |
---|---|
page | 2 |
limit | 5 |
Requirements
- Docker
- Docker Compose
Installation
- Clone the repository and change directory into it
- run:
docker-compose up --build
Field | Type | Key | Description |
---|---|---|---|
id | int | Primary | Unique identifier for each product |
title | string | The title of the product | |
body | string | The description of the product | |
price | float64 | The price of the product | |
created | datetime | Created timestamp | |
updated | datetime | Updated timestamp | |
deleted | datetime | Deleted timestamp |
- products
- GET /products
- return all product entries
- GET /products/{product_id}
- return single product information
- POST /products
- create a new product entry
- PUT /products/{product_id}
- update information for a specific product
- DELETE /products/{product_id}
- delete a specific product
- GET /products