- Go 1.18+
- PosgreSQL server
- Docker for database testing with testcontainer
- Buf for generating the grpc stubs
- protoc-gen-go, protoc-gen-go-grpc, ,
For a starter, export env env.example
to your os env / docker env
go mod tidy
After all installed properly, start the development.
go run cmd/server/main.go -port 9998
HTTP/1.1 POST API with curl
$ curl \
--header "Content-Type: application/json" \
--data '{"name": "John"}' \
http://localhost:9998/user.v1.UserService/Create
gRPC with grpccurl
$ grpcurl \
-protoset <(buf build -o -) -plaintext \
-d '{"name": "John"}' \
localhost:9998 user.v1.UserService/Create
reponse:
{"message": "OK"}
go test ./...
- Observability
- Opentelemetry Tracer & metric SDK
- otel middleware for gorm, grpc/http
- Server Otel Collector (docker-compose)
- Server Jaeger (docker-compose)
- Server Prometheus (docker-compose)
- Server Grafana (docker-compose)
- Log agent & agregator ELK
- grpc integration test
- Dockerfile
- Makefile for test, build etc.
- proto to openapi spec (swagger UI)
- moreee :D