项目作者: d3ta-go

项目描述 :
DDD Module: Email
高级语言: Go
项目地址: git://github.com/d3ta-go/ddd-mod-email.git
创建时间: 2020-11-07T12:04:39Z
项目社区:https://github.com/d3ta-go/ddd-mod-email

开源协议:MIT License

下载


ddd-mod-email ( Go Report Card )

DDD Module: Email (Generic Subdomain)

As a part of Simple Implementation of Modular DDD Technical Architecture Patterns in Go.

Diagram v 0.2.2-Modular

DDD-Technical-Architecture-Patterns-Golang-0.2.2-DDD Email Module

Components

A. Interface Layer (None)

B. DDD Modules:

  1. Email - using DDD Layered Architecture (Contract, GORM, SMTP) [ d3ta-go/ddd-mod-email ]

C. Common System Libraries [ d3ta-go/system ]:

  1. Configuration - using yaml
  2. Identity & Securities - using JWT, Casbin (RBAC)
  3. Initializer
  4. Email Sender - using SMTP
  5. Handler
  6. Migrations
  7. Utils

D. Databases

  1. MySQL (tested)
  2. PostgreSQL (untested)
  3. SQLServer (untested)
  4. SQLite3 (untested)

E. Messaging [to-do]

F. Logs [to-do]

Development

1. Clone

  1. $ git clone https://github.com/d3ta-go/ddd-mod-email.git

2. Setup

  1. a. copy `conf/config-sample.yaml` to `conf/config.yaml`
  2. b. copy `conf/data/test-data-sample.yaml` to `conf/data/test-data.yaml`
  3. c. setup your dependencies/requirements (e.g: database, smtp, etc.)

3. Runing TDD on Development Stage

3.1. TDD: DB Migration Test

  1. $ cd ddd-mod-account
  2. $ sh tdd/clean-testcache.sh
  3. $ sh tdd/ut.db.migration.run-001.sh
  4. $ sh tdd/ut.db.migration.rollback-001.sh

3.2. TDD: Functionality Test (unit test)

  1. $ cd ddd-mod-account
  2. $ sh tdd/clean-testcache.sh
  3. $ sh tdd/ut.db.migration.run-001.sh
  4. $ sh tdd/ut.pkg.infra-layer.repository-001.sh
  5. $ sh tdd/ut.pkg.app-layer.service-001.sh
  6. $ sh tdd/ut.pkg.app-layer.application-001.sh

OR

  1. $ cd ddd-mod-account
  2. $ sh tdd/run.tdd.sh

TDD Result Sample:

  • MySQL Database:

MySQL Database Migration Result

  • MailHog (SMTP Email Server):

MailHog/SMTP Email Server Result