Skip to content

Latest commit

 

History

History
64 lines (42 loc) · 2.11 KB

README.md

File metadata and controls

64 lines (42 loc) · 2.11 KB

Account Service

About

This is a symbolic project for training and learning GoLang.

The main purpose of the project is to serve as a microservice that provides simple authentication and authorization mechanism. The project is based in event-driven architecture(EDA) and clean architecture principles.

The project provides a REST API for synchronous communication. For asynchronous communication, it utilizes AWS SNS and webhooks.

Arch Overview

Dependencies

*. Development mode

Setup

In development mode, you need to duplicate .env.dev file and rename it to .env. Feel free to change any value in your new .env file just in case.

# installing dependencies
go mod download

# starting infrastructure dependencies
docker-composer up -D

# starting rest api
go run cmd/rest-api/main.go

# starting events consumer
go run cmd/event-consumer/main.go

# starting webhook schedule
go run cmd/webhook-schedule/main.go

# starting webhook sender
go run cmd/webhook-sender/main.go

Tests

# Run all test
go test -coverprofile=coverage.out ./...

# Coverage
go tool cover -html=coverage.out

Helpful Tips

  • To view API endpoints and payloads, access this directory *.
  • To see all the events, check this file out.

*. You can use the Rest Client extension in your vscode to test the API. Use this file as a model to configure your vscode settings.