GOLANG 1.14
GORM
GORILLA-MUX
POSTGRESQL
For Get All Products GET localhost:8080/api/products
For Get Product By Id GET localhost:8080/api/products/{id}
For Add Product POST localhost:8080/api/products
{
"product_name" :" " ,
"description" :" " ,
"price" :0.0 ,
"category_id" :1
}
For Update Product PATCH localhost:8080/api/products/update
{
"id" :1 ,
"product_name" :" " ,
"description" :" " ,
"price" :0.0 ,
"category_id" :1
}
For Delete Product DELETE localhost:8080/api/products/{id}
For Get All Categories GET localhost:8080/api/categories
For Get Category By Id GET localhost:8080/api/categories/{id}
For Add Category POST localhost:8080/api/categories
For Update Category PATCH localhost:8080/api/categories/update
{
"id" :1 ,
"category_name" :" "
}
For Delete Category DELETE localhost:8080/api/categories/{id}
For Get All Users GET localhost:8080/api/users
For Get User By Id GET localhost:8080/api/users/{id}
For Add User POST localhost:8080/api/users
{
"first_name" :" " ,
"last_name" :" " ,
"email" :" " ,
"password" :" " ,
"phone_number" :" " ,
"birth_date" :" " ,
}
For Update User POST localhost:8080/api/users/update
{
"first_name" :" " ,
"last_name" :" " ,
"email" :" " ,
"password" :" " ,
"phone_number" :" " ,
"birth_date" :" " ,
}
For Delete User DELETE localhost:8080/api/users/{id}