This is a project that takes advantage of the go-kit
framework and creates microservices.
/Users/<your-username>/go/src/
forMac
/home/<your-username>/go/src/
forLinux
- Create database
coinsph
for the userpostgres
- Create a table
accounts
CREATE TABLE accounts (Id VARCHAR (100) UNIQUE NOT NULL, username VARCHAR (50) UNIQUE NOT NULL, currency VARCHAR (20) NOT NULL, balance VARCHAR (100) NOT NULL);
- Create another table
payments
CREATE TABLE payments (id VARCHAR(100) UNIQUE NOT NULL, sender VARCHAR(100) NOT NULL, reciever VARCHAR(100) NOT NULL, amount NUMERIC NOT NULL, initiated TIME NOT NULL, completed TIME NOT NULL);
go run main.go
exposing the service locally on port 8080
The linter used here is golangci-lint
and to run it, simple go within the root of the repo and run golangci-lint run
docker build -t coinsph-dev .
docker scan
for any vulnerabilities (optional)docker run -it -p 8080:8080 coinsph-dev