A microservice to handle companies. It provides the following operations: • Create • Patch • Delete • Get (one)
Clone the project
git clone https://github.com/jain-chetan/companyservice.git
Go to the project directory
cd companyservice
Install dependencies
go mod tidy
go mod vendor
Start the server
go run main.go
golangci-lint - Check linting issue
golangci-lint run
Run the APIs by hitting on Postman
{POST}/createtoken - generates token for a user to authenticate {POST}/companies - to add company details {GET}/companies/{id} - to get the company details based on the uuid provided {PATCH}/companies/{id} - to update the company details based on the uuid provided {DELETE}/companies/{id} - to delete the company details based on the uuid provided
Build the Docker image using the docker build command.
docker build -t companyservice .
Once the image is built, you can run a Docker container based on that image using the docker run command:
docker run -p 8080:8080 companyservice
Golang - go 1.18
PostgreSQl DB
Postman