data management service for dhammanva search system
This service use to store managed data
deploy data service deploy data db
- Install golang
- Install docker / make
- Start data management db
cd <your-path>/<project-root(where docker compose is)>
docker compose -f docker-compose.dev.yml up -d data-db
- Copy raw data then create datasource directory and paste the file
There are 3 ways to run the service
- Using golang (Recommend for isolate service development)
cd <your-path>/data-management-service
go mod tidy go mod vendor go run mock/isolate.go
- Using docker
- uncomment every line in Dockerfile
- Navigate to root directory
- Run
docker compose -f docker-compose.dev.yml up --build -d data-service
- Using make (spin up all dependencies service) (recommend for final testing / testing with another services)
- Install make
- run
cd <your-path>/patipada-search
make up_build_data
- to run all test cases
go test -v ./...
- integration test
go test -v ./tests
- unit tests are inside each layer
Postman documentation : link
Language : Golang Web Server : Gin Database: Mongo DB
This service imply clean architecture
.
├── communication # gRPC client setup
├── proto # GRPC
├── auth_proto
├── search_proto
├── config
├── database
├── mock # mock external services
├── errors # Custom errors
├── messages # Response Message
├── server
├── it # integration testing
├── structValidator # validator
├── request
├── handlers
├── entities
├── usecases
├── repositories
├── models
├── helper
├── app.env # default env file
├── go.mod
├── go.sum
├── main.go
├── Dockerfile # Docker file use to build docker image
└── README.md