Go WhatsApp REST API Implementation Using Fiber And Swagger

Go WhatsApp REST API Implementation Using Fiber And Swagger

Package cooljar/go-whatsapp-fiber Implements the WhatsApp Web API using Fiber web framework, and also Swag to generate Swagger Documentation (2.0).
This repository contains example of implementation Rhymen/go-whatsapp package.

Getting Started

These instructions will get you a copy of the project up and running on docker container and on your local machine.

Prerequisites

Prequisites package:

  • Docker - for developing, shipping, and running applications (Application Containerization).
  • Go - Go Programming Language
  • Swag - converts Go annotations to Swagger Documentation 2.0
  • Make - Automated Execution using Makefile

Optional package:

  • gosec Golang Security Checker. Inspects source code for security problems by scanning the Go AST

Running On Docker Container

  1. Rename Makefile.example to Makefile and fill it with your make setting.
  2. Run project by using following command:
$ make run

# Process:
#   - Generate API docs by Swagger
#   - Build and run Docker containers

Stop application by using following command:

$ make stop

# Process:
#   - Stop and remove app container
#   - remove image

Running On Local Machine

Below is the instructions to run this project on your local machine:

  1. Rename run.sh.example to run.sh and fill it with your environment values.
  2. Open new terminal.
  3. Set run.sh file permission.
$ chmod +x ./run.sh
  1. Run application from terminal by using following command:
$ ./run.sh

API Access

Go to your API Docs page: 127.0.0.1:3000/swagger/index.html
API Docs page will be look like:

Below is the instructions to perform messaging:

  • Make sure your computer is connected to the internet.
  • Prepare your smartphone and make sure the internet is active.
  • Hit the Login endpoint, you will see a QR Code if request was success.

    Check your Makefile setting if an error occurred.
  • Scant it, and done. Now you can perforn all endpoint to send a message.

Testing

  • Inspects source code for security problems using gosec. You need to install it first.
  • Execute unit test by using following command:
$ make test

Built With

  • Go - Go Programming Languange
  • Go Modules - Go Dependency Management System
  • Make - GNU Make Automated Execution
  • Docker - Application Containerization

Authors

  • Fajar Rizky - Initial Work - cooljar

More


Owner
Mohammad Fajar Rizky
Little time, large progress
Mohammad Fajar Rizky
Similar Resources

Simple REST-API implementation using Golang with several packages (Echo, GORM) and Docker

Simple REST-API Boilerplate This is a simple implementation of REST-API using Golang and several packages (Echo and GORM). By default, I use PostgreSQ

Sep 13, 2022

An example repo for RESTful API with swagger docs & unit testing

go REST API An example repo for RESTful API with swagger docs & unit testing Starting development server Copy .env.example to .env in the same directo

Nov 5, 2021

Percobaan membuat API dengan Golang menggunakan web framework Gin dan Swagger docs.

Percobaan membuat API dengan Golang menggunakan web framework Gin dan Swagger docs.

Percobaan Gin Framework Percobaan membuat API dengan bahasa Go-lang. Tech Stack Gin - Web framework Gin Swaggo - Swagger Docs integration for Gin web

Feb 11, 2022

Best simple, lightweight, powerful and really fast Api with Golang (Fiber, REL, Dbmate) PostgreSqL Database and Clean Architecture

GOLANG FIBER API (CLEAN ARCHITECTURE) Best simple, lightweight, powerful and really fast Api with Golang (Fiber, REL, Dbmate) PostgreSqLDatabase using

Sep 2, 2022

A list of modules useful for using with fiber

Fiber Modules A list of modules useful for using with fiber Install go get github.com/gkampitakis/fiber-modules Contents healthcheck Local Development

Nov 28, 2022

REST Layer, Go (golang) REST API framework

REST Layer, Go (golang) REST API framework

REST Layer REST APIs made easy. REST Layer is an API framework heavily inspired by the excellent Python Eve. It helps you create a comprehensive, cust

Dec 16, 2022

REST API made using native Golang libraries. This API resembles the basic working of Instagram.

REST API made using native Golang libraries. This API resembles the basic working of Instagram.

Golang RESTful API for Instagram A Go based REST API built using native libraries. The API has been thoroughly worked through with Postman. Routes inc

Mar 16, 2022

基于Golang的框架Gin开发,项目结构和理念参考Laravel。现支持:MySQL、Redis、MVC、拦截器、助手函数、fresh热更、swagger-UI、tpl模版输出、安全的Api。

GinLaravel的构建和运行周期与Beego、Vue、React、Laravel、ThinkPHP、Django等都会有类似的引导思路、参数设置、插件扩展、服务部署、代码统一性、生态护城河等。

Nov 18, 2022

Template/Starter code for Go application with Gin, System Tray, Gorm, Air, Swagger, JWT

gin-systray-starter Starter code for Go application with Gin, System Tray, Gorm, Air, Swagger, JWT systray, https://github.com/getlantern/systray gin,

Sep 16, 2022
Swagger + Gin = SwaGin, a web framework based on Gin and Swagger
Swagger + Gin = SwaGin, a web framework based on Gin and Swagger

Swagger + Gin = SwaGin Introduction SwaGin is a web framework based on Gin and Swagger, which wraps Gin and provides built-in swagger api docs and req

Dec 30, 2022
Swagger + Gin = SwaGin, a web framework based on Gin and Swagger
Swagger + Gin = SwaGin, a web framework based on Gin and Swagger

Swagger + Gin = SwaGin Introduction SwaGin is a web framework based on Gin and Swagger, which wraps Gin and provides built-in swagger api docs and req

Dec 30, 2022
Nov 15, 2022
A REST web-service sample project written in Golang using go-fiber, GORM and PostgreSQL

backend A REST web-service sample project written in Golang using go-fiber, GORM and PostgreSQL How to run Make sure you have Go installed (download).

Jan 1, 2023
Go fiber simple rest API
Go fiber simple rest API

Go Fiber Gorm CRUD Example Go 1.17 Fiber v2 Gorm with sqlite database driver Swa

Jul 15, 2022
Rest API Template [GO + Fiber + Mongo]

GoFiber MongoDB Rest API Template Feature: Full CRUD REST API MongoDB native driver; no use of orm/odm How to structure a production ready API (Model/

Jan 6, 2022
A Go API project using Beego(Go Framework) with Swagger UI

Beego_API_with_swagger_UI Descriptions This is a Go API project using Beego(Go F

Dec 20, 2021
Generate boilerplate + endpoints for Fiber REST APIs.

gomakeme Generate boilerplate + endpoints for Fiber REST APIs. Never spend 6 minutes doing something by hand when you can spend 1 week to automate it

Dec 30, 2022
CRUD API server of Clean Architecture with Go(Echo), Gorm, MySQL, Docker and Swagger
CRUD API server of Clean Architecture with Go(Echo), Gorm, MySQL, Docker and Swagger

CRUD API Server of Clean Architecture Go(echo) gorm mysql docker swagger build docker-compose up -d --build API Postman and Fiddler is recommended to

May 14, 2022
Example Golang API backend rest implementation mini project Point Of Sale using Gin Framework and Gorm ORM Database.

Example Golang API backend rest implementation mini project Point Of Sale using Gin Framework and Gorm ORM Database.

Dec 23, 2022