freedom

package module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 11 Imported by: 8

README

freedom

License Go Report Card Build Status GoDoc

freedom是一个基于六边形架构的框架,可以支撑充血的领域模型范式。

Overview

  • 集成iris
  • 集成普罗米修斯
  • 集成gorm
  • 链路追踪
  • infra容器 基于组件的基础设施
  • http2 server
  • http2 client
  • 依赖注入&依赖倒置
  • CRUD 代码生成
  • DDD&六边形架构
  • 消息事件&领域事件

进行中

  • aggregate最终一致
  • aggregate强一致

安装

$ go get github.com/8treenet/freedom/freedom

创建项目

$ freedom new-project [project-name]

生成crud 值对象

# 编辑 [project-name]/cmd/conf/db.toml 填入数据库地址
# 可指定配置地址和输出目录 freedom new-crud -h 查看更多
$ cd [project-name]
$ freedom new-crud

Example

基础教程
http2监听和依赖倒置
repository和事务组件
消息事件和领域事件
ddd-example
一个完整的电商项目,包含CQRS、聚合、实体、领域事件、仓库、基础设施。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Booting

func Booting(f func(Initiator))

Booting .

func Configure added in v0.0.3

func Configure(obj interface{}, fileName string, def bool)

Configure .

func Logger

func Logger() *golog.Logger

Logger .

Types

type Application

type Application interface {
	InstallGorm(f func() (db *gorm.DB))
	InstallRedis(f func() (client redis.Cmdable))
	InstallMiddleware(handler iris.Handler)
	InstallParty(relativePath string)
	CreateH2CRunner(addr string, configurators ...host.Configurator) iris.Runner
	CreateRunner(addr string, configurators ...host.Configurator) iris.Runner
	Iris() *iris.Application
	Logger() *golog.Logger
	Run(serve iris.Runner, c iris.Configuration)
	InstallDomainEventInfra(eventInfra DomainEventInfra)
}

Application .

func NewApplication added in v1.0.5

func NewApplication() Application

NewApplication .

type Context added in v1.3.0

type Context = iris.Context

type DomainEventInfra added in v1.3.7

type DomainEventInfra = general.DomainEventInfra

type Entity added in v1.3.7

type Entity = general.Entity

type GORMRepository

type GORMRepository = general.GORMRepository

GORMRepository .

type Infra added in v1.3.0

type Infra = general.Infra

Infra .

type Initiator

type Initiator = general.Initiator

Initiator .

type QueryBuilder

type QueryBuilder = general.QueryBuilder

QueryBuilder .

type Repository

type Repository = general.Repository

Repository .

type Result added in v1.3.0

type Result = hero.Result

type Runtime

type Runtime = general.Runtime

Runtime .

func PickRuntime added in v1.5.0

func PickRuntime(ctx Context) Runtime

type SingleBoot added in v1.1.9

type SingleBoot = general.SingleBoot

SingleBoot .

type UnitTest added in v1.4.0

type UnitTest = general.UnitTest

func NewUnitTest added in v1.4.0

func NewUnitTest() UnitTest

Jump to

Keyboard shortcuts

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