Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siddheshk02/grpc
https://github.com/siddheshk02/grpc
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/siddheshk02/grpc
- Owner: Siddheshk02
- License: gpl-3.0
- Created: 2024-05-28T14:07:54.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-28T16:46:44.000Z (7 months ago)
- Last Synced: 2024-05-29T07:52:59.239Z (7 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang gRPC User Service
This project implements a Golang gRPC service for managing user details with functionalities to fetch user details by ID, retrieve a list of user details by IDs, and search for user details based on specific criteria.
## Features
- Fetch user details by ID
- Retrieve a list of user details by IDs
- Search for user details based on specific criteria (e.g., first name, city, phone number, marital status)
- Dockerized for easy deployment## Prerequisites
- Go (1.19+)
- Docker## Getting Started
### Pulling the Docker Image
To run the gRPC service, you can pull the pre-built Docker image from Docker Hub.
```
docker pull siddheshk02/grpc:latest
```Running the Docker Container
```
docker run -p 50051:50051 siddheshk02/grpc:latest
```You can use grpcurl to test the gRPC endpoints:
1. GetUser:
```
grpcurl -plaintext -d '{"id": 1}' localhost:50051 pb.UserService/GetUser
```2. ListUsers:
```
grpcurl -plaintext -d '{"ids": [1, 2]}' localhost:50051 pb.UserService/ListUsers
```3. SearchUser:
```
grpcurl -plaintext -d '{"fname": "Mark", "city": "CA"}' localhost:50051 pb.UserService/SearchUsers
```