chandrikadeb7 / go-couchbase-microservice

Go Microservice developed using Go Echo API Server OpenAPI with Couchbase backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BillingCyleSpecification - Microservice using Go Echo API Server for openapi

This API manages the BillingCycle resource, which is the representation (instantiation) of the cycle specification for a specific billing run. The API includes services for storing and retrieving the BillingCycle resource.

Running the server

To run the server, follow these simple steps:

Pre-requisites

  1. Docker installed on your machine.
  2. Disconnect to VPN .

Creating couchbase container

cd couchbase-custom
docker-compose up

Once the couchbase container is up and running access it at http://localhost:8091/ .

  • Create a bucket named test-bucket .
  • Create an index on the test-bucket.
CREATE PRIMARY INDEX idx_default_primary ON `test-bucket` USING GSI;

Creating billing-cycle-ms-app container

Onto the application home i.e. walk-the-tech-go folder.

docker-compose up
If you already have couchbase running on your local
  • You can add couchbase username and password as environment variables on your windows.Refer container.go file.
  • Change the port on main.go .
  • Refer .env file for all environment variables.
  • You can the application on non-docker env using the below commands
go build -o billing-cycle-ms-app
go run .
Known Issue

Couchbase container may take sometime to ready. You may have to restart the application container for establishing the connection with couchbase.

Disclaimer

This server was generated by the [openapi-generator] (https://openapi-generator.tech) project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

README

  • API version: 1.0
  • Build date: 2022-01-06T10:29:30.636+05:30[Asia/Calcutta]

About

Go Microservice developed using Go Echo API Server OpenAPI with Couchbase backend


Languages

Language:Go 99.2%Language:Dockerfile 0.8%