Boss-Stock Fiber (Go) and MongoDB REST API

Boss-Stock Fiber (Go) and MongoDB REST API

An API built with Fiber and MongoDB.

Installation

go mod init
go get -u github.com/gofiber/fiber/v2
go get go.mongodb.org/mongo-driver/mongo
go get github.com/joho/godotenv

API Usage

Get all products

  GET /products
Optional Parameter Type Description Example
s string Serach Product Name or Products ?s=exmpletext
page int Page number. Default: 1 ?page=2
limit int Limit number of products per page. Default: 10 ?limit=20

Get products

  GET /products/:id
Parameter Type Description
id string Required. Id of products to fetch

Add products

  POST /products
{
    "name": "Apple",
    "detail": "Apple AirPods 2",
    "price": 25.80,
    "quantity":20,
    "barcode": 1003,
    "store_id": 2,
    "category_name": "Telefon",
    "entry_price": 20.80,
    "kdv": 18.0
}

Update catchphrase

  PATCH /products/:id
Parameter Type Description
id string Required. Id of product to update
{
    "name": "Apple",
    "detail": "Apple AirPods 3", //Update AirPods Model 2 to 3
    "price": 25.80,
    "quantity":20,
    "barcode": 1003,
    "store_id": 2,
    "category_name": "Telefon",
    "entry_price": 20.80,
    "kdv": 18.0
}

// All nine fields are optional when updating

Remove product

  DELETE /products/:id
Parameter Type Description
id string Required. Id of products to delete

Thanks

Tutorial https://dev.to/mikefmeyer/build-a-go-rest-api-with-fiber-and-mongodb-44og

Similar Resources

Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Jan 13, 2022

Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.

Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.

Vaku Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine. Vaku extends the existing Vault CLI an

Nov 28, 2022

Simple and complete API for building command line applications in Go

Simple and complete API for building command line applications in Go Module cli provides a simple, fast and complete API for building command line app

Nov 23, 2022

cross platform command line tool to list, notify and book vaccine using cowin API

Command line tool to List and Book Vaccine cowin-cli is a simple cli tool to book vaccines and list centers using the COWIN API. It also supports auto

Mar 7, 2022

Go pkg and cli tool to sign Google Maps API URLs

gmapsign gmapsign is a Go pkg and cli tool to sign Google Maps API request URLs. This is required when using: A client ID with the web service APIs, M

Jul 4, 2022

this service provides an API for publishing and managing your articles

REST API Для Публикации и Работы с Articles на Go В работе применены следующие концепции: Разработка Веб-Приложений на Go, следуя дизайну REST API. Ра

Jul 25, 2022

Syno-cli - Synology unofficial API CLI and library

Synology CLI Unofficial wrapper over Synology API in Go. Focus on administrative

Jan 6, 2023

🚀 Platform providing a powerful and fast public script parsing API dedicated to the Skript community.

SkriptMC-Parser is currently a prototype in the early stages of development of a system that allows the Skript community to test their scripts via a public API for potential errors or warnings. This is a quick and easy way to check your scripts without having to set up a Spigot server on your environment.

Mar 3, 2022

Go library for accessing the Reddit API.

Go library for accessing the Reddit API.

Overview Featured in issues 327 and 347 of Golang Weekly 🎉 go-reddit is a Go client library for accessing the Reddit API. You can view Reddit's offic

Jan 7, 2023
Terminal stock ticker with live updates and position tracking
Terminal stock ticker with live updates and position tracking

Ticker Terminal stock watcher and stock position tracker Features Live stock price quotes Track value of your stock positions Support for multiple cos

Jan 8, 2023
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker. Installation Requirements: golang >= 1.13 Manual Clone the repo Run make && make install Pack

Dec 16, 2022
react, fiber, api just for saying hello

say-hello Introduction Sometimes we need to have a frontend besides the backend. This repository uses React to show how we can server a React build an

Nov 9, 2022
Fiber v2 ,web framework for go.

go run main.go Liveness Probe cat /tmp/live echo $? output = 0 ,status = up Method RelativePath CURL GET /healthz http://127.0.0.1:8080/healthz GET

Jan 10, 2022
Restful services on a Go application integrated with mongodb. Articles demo application.

article-app Restful Go services demo integrated with MongoDB by Cahit Ünver article-app is a GO application integrated with MongoDB. Application is a

Jan 17, 2022
Simple CLI using spf13/cobra and Flink REST API

Flinkctl Flinkctl is a simple CLI written on Go using Cobra created to facilitate my team's daily basis work with multiple Flink clusters at Azion Tec

Aug 16, 2022
A basic REST API implementing crud functionalities with MySQL.

go-crud-app A CRUD REST API with mysql Uses: gorilla/mux gorm Implemented [ ✔ ] GET /book returns list of books as JSON [ ✔ ] GET /book/{id} returns d

Oct 16, 2022
Todos REST API build using echo server.

Todos REST API build using echo server.

Feb 2, 2022
Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

Aug 29, 2022
A few serve, the rest enjoy the free drinks

Tavern A few serve, the rest enjoy the free drinks. ⚠️ Work in progress, experimental As the Tavern client downloads, decrypts and publishes to the wo

Jul 29, 2022