Simple go server with Docker build file
Project structure follows goland-standards recommendations.
Generate modeling structs for gRPC contract
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
api/model/*.proto
Requesting unary User endpoints -
grpcurl -H 'authorization: Bearer test' -d '{"id":"<test>"}' -plaintext localhost:9090 playground.UserService.GetUser
grpcurl -H 'authorization: Bearer test' -d '{"name":"test","email":"[email protected]","password":"helloworld"}' -plaintext localhost:9090 playground.UserService.CreateUser
grpcurl -H 'authorization: Bearer test' -d '{"id":"<test>","name":"updatedName","email":"[email protected]", "password":"updatedPassword"}' -plaintext localhost:9090 playground.UserService.UpdateUser
grpcurl -H 'authorization: Bearer test' -d '{"user_id":"<test>"}' -plaintext localhost:9090 playground.UserService.DeleteUser
docker compose --env-file local.env up