Skip to content

Api project with Golang, Gorm, Gorilla-Mux, Postgresql

License

Notifications You must be signed in to change notification settings

MET-DEV/api-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TECHNOLOGIES

  • GOLANG 1.14
  • GORM
  • GORILLA-MUX
  • POSTGRESQL

API's PATHS

For Product Service

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
Request Body:
{
    "product_name":"",
    "description":"",
    "price":0.0,
    "category_id":1
}
For Update Product PATCH localhost:8080/api/products/update
Request Body:
{
    "id":1,
    "product_name":"",
    "description":"",
    "price":0.0,
    "category_id":1
}
For Delete Product DELETE localhost:8080/api/products/{id}

For Category Service

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
Request Body:
{
    "category_name":""
}
For Update Category PATCH localhost:8080/api/categories/update
Request Body:
{
    "id":1,
    "category_name":""
}
For Delete Category DELETE localhost:8080/api/categories/{id}

For User Service

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
Request Body:
{
    "first_name":"",
    "last_name":"",
    "email":"",
    "password":"",
    "phone_number":"",
    "birth_date":"",
}
For Update User POST localhost:8080/api/users/update
Request Body:
{
    "first_name":"",
    "last_name":"",
    "email":"",
    "password":"",
    "phone_number":"",
    "birth_date":"",
}
For Delete User DELETE localhost:8080/api/users/{id}

Releases

No releases published

Packages

No packages published

Languages