GithubHelp home page GithubHelp logo

met-dev / api-project Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 40 KB

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

License: MIT License

Go 100.00%
golang gorm-orm gorilla-mux postgresql rest-api go-playground-validator migrations bcrypt

api-project's Introduction

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}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.