Microservice that hosts two APIs: a gRPC API and a JSON API. It uses protocol buffers as communication format and SQL Lite as datastore. It also has a gRPC client that can be used to communicate with the API and make some JSON API requests.
This project requires a gcc
compiler installed and the protobuf
code generation tools.
Download the appropriate binary for your operating system from https://github.com/protocolbuffers/protobuf/releases.
Install by placing the extracted binary somewhere in your $PATH
. Additional instructions available at https://grpc.io/docs/protoc-installation/.
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
After creating your .proto
file, this command will generate the necessary code.
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
Proto/mail.proto