module
0.0.0-20240209111548-85c6900acf9c
Repository: https://github.com/clintrovert/go-playground.git
Documentation: pkg.go.dev
# README
go-playground
Simple go server with Docker build file
Project structure follows goland-standards recommendations.
Pre-requisites
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
Local Development
Requesting unary User endpoints -
Get User
grpcurl -H 'authorization: Bearer test' -d '{"id":"<test>"}' -plaintext localhost:9090 playground.UserService.GetUser
Create User
grpcurl -H 'authorization: Bearer test' -d '{"name":"test","email":"[email protected]","password":"helloworld"}' -plaintext localhost:9090 playground.UserService.CreateUser
Update User
grpcurl -H 'authorization: Bearer test' -d '{"id":"<test>","name":"updatedName","email":"[email protected]", "password":"updatedPassword"}' -plaintext localhost:9090 playground.UserService.UpdateUser
Delete User
grpcurl -H 'authorization: Bearer test' -d '{"user_id":"<test>"}' -plaintext localhost:9090 playground.UserService.DeleteUser
Starting Local Dependencies
docker compose --env-file local.env up