Categorygithub.com/anku580/CRM_Backend
modulepackage
0.0.0-20220731084736-abe9dd684f60
Repository: https://github.com/anku580/crm_backend.git
Documentation: pkg.go.dev

# README

Table of Contents
  1. About The Project
  2. Getting Started
  3. License
  4. Contact

About The Project

This project is basic CRUD operation that is built using Go. It contains 5 APIs -

  • Create Customer
  • Fetch All Customers
  • Update a Customer
  • Delete a Customer
  • Fetch Customer by ID

Currently when you start the application it have a mock data of 3 customers.

(back to top)

Built With

This project is built using Go. The Go programming language is an open source project to make programmers more productive.

Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

(back to top)

Getting Started

To run the project, please include this project in go workspace.

Prerequisites

Need to have Go installed in your local machine.

Installation

Install the packages before running go run command.

(back to top)

Usage

Create Customer

To create a customer using POST API - http://localhost:3000/createCustomer, please include the following object in the request body of the request.

{
    "name": "Anku",
    "role" : "user",
    "email": "[email protected]",
    "phone": 1234,
    "conacted": false
}

View Single Customer

To get a single customer, use GET API - http://localhost:3000/getCustomer/{id}, please specify the customer id. Since, it a GET API, no request body is required.

View List of Customers

To get the entire list of the customers, use GET API - http://localhost:3000/getAllCustomers.

Updating a Customer

To update a customer using PUT API - http://localhost:3000/updateCustomer/{id}, please include the following object in the request body of the request.

{
    "name": "anku",
    "role" : "user",
    "email": "[email protected]",
    "phone": 123412,
    "conacted": false
}

Deleting a Customer

To delete a single customer, use DELETE API - http://localhost:3000/deleteCustomer/{id}, please specify the customer id. Since, it a GET API, no request body is required.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - Anku Garg - [email protected]

(back to top)

# Structs

No description provided by the author