Giter Site home page Giter Site logo

ecommerce-go's Introduction

POST COLLECTION

    #you can import post collection with this link
    https://www.getpostman.com/collections/3cbd38408b97b3796b8d

Cara Menjalankan Project

    - Manual Tanpa Docker
        - Install MongoDb terlebih dahulu, lalu configurasikan ke env
        - masuk ke dalam project
        - lalu jalankan perintah go run main.go 
    - Dengan Docker
        - Install Docker terlebih dahulu
        - masuk ke dalam project
        - lalu jalankan perintah
        - docker-compose -f docker-compose.yml up -d

App akan berjalan di port 8000

Api Spesification

Request :

  • Method : POST
  • Endpoint : users/signup
  • Body : raw
{
  "first_name": "Prayugo",
  "last_name": "Dwi",
  "email": "[email protected]",
  "password": "Prayugo",
  "phone": "+628975666"
}

Request :

  • Method : POST
  • Endpoint : users/login
  • Body :
{
  "email": "[email protected]",
  "password": "Prayugo"
}

Request :

  • Method : POST
  • Endpoint : /admin/addproduct
  • Body :
{
  "product_name": "Alienware x10",
  "price": 2500,
  "rating": 10,
  "image": "alienware.jpg"
}

Request :

  • Method : GET
  • Endpoint : /users/productview
  • Body :

Request :

  • Method : GET
  • Endpoint : /users
  • Body : QueryParam - name={keyword}

Request :

  • Method : GET
  • Endpoint : /addtocart
  • Header: token: {token_user}
  • Body : QueryParam - id={id_product} - userID={id_user}

Request :

  • Method : GET
  • Endpoint : /removeitem
  • Header: token: {token_user}
  • Body : QueryParam - id={id_product} - userID={id_user}

Request :

  • Method : GET
  • Endpoint : /listcart
  • Header: token: {token_user}
  • Body : QueryParam - id={id_user}

Request :

  • Method : POST
  • Endpoint : /addaddress
  • Header: token: {token_user}
  • Body : QueryParam - id={id_user} raw
{
  "house_name": "Rumah Bahagia",
  "street": "Jalan Tirto Sari",
  "city_name": "Purwokerto",
  "pin_code": "20112"
}

Request :

  • Method : PUT
  • Endpoint : /edithomeaddress
  • Header: token: {token_user}
  • Body : QueryParam - id={id_user} raw
{
  "house_name": "Rumah Sentosa",
  "street": "Jalan Tirto Sari",
  "city_name": "Purwokerto",
  "pin_code": "20112"
}

Request :

  • Method : DELETE
  • Endpoint : /deleteaddresses
  • Header: token: {token_user}
  • Body : QueryParam - id={id_user}

Request :

  • Method : GET
  • Endpoint : /cartcheckout
  • Header: token: {token_user}
  • Body : QueryParam - id={id_user}

ecommerce-go's People

Watchers

James Cloos avatar Prayugo Dwi avatar

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.