Insta API using Go and Mongodb

Insta-API

HTTP JSON API that can be used to perform basic tasks of Creating User, Creating Post, Getting User & Post details through their Unique ID. It is developed using Go-Lang and MongoDB as database

Brief Overview of API

The API provides following features

  1. Create User:
  • A POST Request is used, data is when entered in JSON body gets added to MongoDB (which is used for storage). Also, the data is added at the https://localhost:9000/users .

  • The Passwords are stored in their SHA256 equivalent so that they can't be reverse engineered.
  • Output:
  • Every user is assigned with their Unique ID.
  1. Create Posts:
  • The Posts are created using POST Method
  • The URL is http://localhost:9000/posts/
  • The request body is in JSON format.
  • The TimeStamp is automatically updated using time.Now() function
  • CreatePosts Function:
  • Creating a post using Postman :
  1. Get User Details by ID:
  • The user details can be fetched from database by sending a GET Request
  • The url is https://localhost:9000/users/<UserID>
  • The Code for Fetching User Details:
  • the Get User Function:
  • The Output of Fetching userdetails by its ID in Postman:
  1. Get Posts Details by ID:
  • The Posts Details can be from MongoDB using the Unique ID of Posts
  • The GET request is to be sent along with id in URL
  • The URL for fetching posts details: http://localhost:9000/posts/<id>
  • The Get Post Function:

NOTE I was unable to create a function for fetching Posts according to User ID, so I created an extra function for deleting users.

  1. Delete User Information:
  • This function deletes the User Records from the Database.
  • It uses DELETE to perform the operation
  • The ID of user is passed in URL for deletion: http://localhost:9000/user/<id>

This repository is maintained by : IamLucif3r

Owner
Anmol Singh Yadav
Cyber Security Practitioner, Bug Hunting, Blockchain, Web-Development, Android-Application Developer, Digital Forensics
Anmol Singh Yadav
Similar Resources

A simple visits tracker built using Go and Redis

visits-tracker A simple visits tracker built using Go and Redis Let me note that this is a really bad idea if you are not backing up Redis since it li

Jan 13, 2022

Experiments using Go 1.18beta1's Generic typings and the Segmentio kafka-go consumer client

Experiments using Go 1.18beta1's Generic typings and the Segmentio kafka-go consumer client

Jan 28, 2022

🔥 A fast and beautiful command line tool to build API requests.

🔥 A fast and beautiful command line tool to build API requests.

Poodle A fast and beautiful command line tool to build API requests 🦄 Check out the full Demo! Poodle is an interactive command line tool to build an

Aug 23, 2022

This API functionality for creating and retrieving users from the IDT backend

This API functionality for creating and retrieving users from the IDT backend

IDT Messaging Api This API functionality for creating and retrieving users from the IDT backend. The Go-Kit library which provides industry standard b

Dec 6, 2021

Sending line notifications using a binary, docker or Drone CI.

Sending line notifications using a binary, docker or Drone CI.

drone-line Sending line notifications using a binary, docker or Drone CI. Register Line BOT API Trial Please refer to LINE Business Center. Feature Se

Sep 27, 2022

:incoming_envelope: A fast Message/Event Hub using publish/subscribe pattern with support for topics like* rabbitMQ exchanges for Go applications

Hub 📨 A fast enough Event Hub for go applications using publish/subscribe with support patterns on topics like rabbitMQ exchanges. Table of Contents

Dec 17, 2022

Discrete-event simulation in Go using goroutines

SimGo SimGo is a discrete event simulation framework for Go. It is similar to SimPy and aims to be easy to set up and use. Processes are defined as si

Sep 6, 2022

Send slack notifications using Github action

Slack notification This is a simple Slack notification action which runs using a Bot token. Example Action A simple example on how to use this action:

Aug 9, 2021

Using golang to produce data to kinesis data stream

Using golang to produce data to kinesis data stream What is this The idea behind this repo was to quickly determine how easy it would be to add a serv

Dec 22, 2022
Related tags
API for sending sms through the connected modem using golang

SMS sender API API for making SMS sending from modem, by sending post request to route Request for Send SMS url method 127.0.0.1:8000/api/v1/send-mode

Nov 5, 2021
Golang Restful API Messaging using GORM ORM (MySQL) Gorilla Mux

Golang Restful API Messaging using GORM ORM (MySQL) Gorilla Mux Getting Started Folder Structure This is my folder structure under my $GOPATH or $HOME

Dec 14, 2021
It's client library written in Golang for interacting with Linkedin Cruise Control using its HTTP API.

go-cruise-control It's client library (written in Golang) for interacting with Linkedin Cruise Control using its HTTP API. Supported Cruise Control ve

Jan 10, 2022
Golang API wrapper for MangaDex v5's MVP API.

mangodex Golang API wrapper for MangaDex v5's MVP API. Full documentation is found here. This API is still in Open Beta, so testing may not be complet

Oct 23, 2022
Mizu - API traffic viewer for Kubernetes enabling you to view all API communication between microservices
Mizu - API traffic viewer for Kubernetes enabling you to view all API communication between microservices

The API Traffic Viewer for Kubernetes A simple-yet-powerful API traffic viewer f

Jan 9, 2023
⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol.

APNS/2 APNS/2 is a go package designed for simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the new HTTP/2 Push provide

Jan 1, 2023
Scalable package delivery logistics simulator built using SingleStore and Vectorized Redpanda
Scalable package delivery logistics simulator built using SingleStore and Vectorized Redpanda

Reference Architecture using SingleStore and Redpanda for global logistics ?? INFO: For the story behind this code (and epic dashboards), check out th

Oct 29, 2022
pubsub controller using kafka and base on sarama. Easy controll flow for actions streamming, event driven.

Psub helper for create system using kafka to streaming and events driven base. Install go get github.com/teng231/psub have 3 env variables for config

Sep 26, 2022
A quick introduction to how Apache Kafka works and differs from other messaging systems using an example application.
A quick introduction to how Apache Kafka works and differs from other messaging systems using an example application.

Apache Kafka in 6 minutes A quick introduction to how Apache Kafka works and differs from other messaging systems using an example application. In thi

Oct 27, 2021
Producer x Consumer example using Kafka library and Go.

Go - Kafka - Example Apache Kafka Commands First of all, run the docker-compose docker-compose up, than run docker exec -it kafka_kafka_1 bash Topics

Dec 8, 2021