golang-ddd-template

module
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: MIT

README

golang-ddd-template

a DDD project template in golang

Quick Start

# download project generator
go get -u github.com/jacexh/gdp@master

gdp

Change Log

0.2.6
0.2.5
  • Graceful Shutdown的exit code改成0
  • 实现Domain Event
0.2.4
  • 实现trace功能,确保request id可以在application、infra等层传递,可支持其他对象的传递
  • 实现Graceful Shutdown
0.2.3
  • 独立option模块,减少main.go文件代码量
  • 配置文件移入./conf目录
0.2.2
  • 使用xorm.io替换github.com/didi/gendry
  • 升级gin/zap等依赖版本
  • dto <--> entity, do <--> entity 转换层更加显性地表达
0.2.1
  • 区分DataObject以及Entity
  • 修改目录名称 infrastructure/repository -> infrastructure/persistence
0.2.0

基于依赖反转原则以及六边形架构重构整个项目

  • 层名称变更:sevice -> application,以及repository -> infrastructure
  • Repository定义在Domain层内
  • Application+Domain 使用依赖反转,具备了更好的可测试性
  • 更清晰的分支管理:master分支为golang项目,template分支为模板
  • 严格区分了EntityValueObjectDataTransferObjectDomainEvent

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL