Categorygithub.com/BoggalaPrabhakar007/golang-assignment
module
0.0.0-20220830143539-8a99425c2779
Repository: https://github.com/boggalaprabhakar007/golang-assignment.git
Documentation: pkg.go.dev

# README

Golang Assignment

This project is about getting the json data and storing into the database and doing CRUD oeration on data.

Project Architecture

Architecture

Clone project

To clone this project run.

  PS C:\Users\boggala\go\src> git clone https://github.com/BoggalaPrabhakar007/golang-assignment.git

Navigate to project folder.

 PS C:\Users\boggala\go\src> cd golang-assignment

Build the microservice (project) docker image

run below command.

   PS C:\Users\boggala\go\src\golang-assignment> docker build -t goland-assignment-image .
   PS C:\Users\boggala\go\src\golang-assignment> docker images                            
   REPOSITORY                TAG       IMAGE ID       CREATED          SIZE  
   goland-assignment-image   latest    50416563fb36   30 minutes ago   1.15GB

Deploy the microservice and mongodb

run below command.

 PS C:\Users\boggala\go\src\golang-assignment> docker-compose up -d
 PS C:\Users\boggala\go\src\golang-assignment> docker container ls
 CONTAINER ID   IMAGE                            COMMAND                  CREATED          STATUS          PORTS                      NAMES
 98e0fc155b64   mongo:4.0                        "docker-entrypoint.s…"   29 seconds ago   Up 22 seconds   0.0.0.0:27017->27017/tcp   golang-assignment_mongodb_1
 887c77b26e85   goland-assignment-image:latest   "/build/golang-assig…"   29 seconds ago   Up 22 seconds   0.0.0.0:8080->8080/tcp     golang-assignment_appservice_1

Postman

open the postman in your system follow the below screenshots.

InsertData

InsertData

GetData

GetData

UpdateData

UpdateData

After Update

AfterUpdate

GetDataById

GetDataByID

DeleteDataById

DeleteDataById

Swagger

Swagger APIs for the service.

InsertData

InsertData

GetData

GetData

UpdateData

UpdateData

GetDataById

GetDataByID

DeleteDataById

DeleteDataById

Swagger APIs

Swagger

To Stop the microservice and mongodb

run below command.

   PS C:\Users\boggala\go\src\golang-assignment> docker-compose down

Lint Errors

Swagger

Unit Test Results

Added total 32 UTs in the project. Swagger

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author