The goal is to write a simple REST or GRPC service in Golang that uses immudb as a database to store lines of logs. Service and immudb should be easily deployable using docker, docker-compose or similar. There should be another simple testing tool that allows you to easily create log entries.
The service should allow to:
- Store single log line
- Store batch of log lines
- Print history of stored logs (all, last x)
- Print number of stored logs
- (optional) Simple authentication mechanism to restrict read/write access.
- (optional) Support for log buckets, so logs from different applications can be separated i.e. depending on source or some token used.
- 🔱 clean architecture (handler->service->repository)
- 📖 standard Go project layout (well, more or less 😊)
- 🔄 gRPC + gateway for REST API
- 🐳 dockerized + docker-composed
- 🐘 ImmuDB in a standard SQL mode used (easy to replace with any other SQL DB)
- Run in docker-compose with
make dc
. This will startlogapi
andimmudb
containers, createusers
andloglines
tables and a test usertest
with passwordtest
. - Run Postman collection from
./postman
to test the API.
- unit tests
- testing tool