freedom

package module
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 8

README

freedom

License Go Report Card Build Status GoDoc

freedom-微服务框架。

Overview

  • 集成iris
  • 集成普罗米修斯
  • 集成gorm
  • 集成gcache
  • 链路追踪
  • 链路共享组件
  • http2 server
  • http2 client
  • 依赖注入
  • CRUD 代码生成

进行中

  • 消息总线
  • XA强一致分布事务
  • 最终一致分布事务

安装

$ 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示例
链路共享组件示例

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, cache gcache.Plugin))
	InstallGormByName(f func() (name string, db *gorm.DB, cache gcache.Plugin))
	InstallRedis(f func() (client redis.Cmdable))
	InstallRedisByName(f func() (name string, client redis.Cmdable))
	InstallMiddleware(handler iris.Handler)
	InstallParty(relativePath string)
	CreateH2CRunner(addr string) iris.Runner
	Iris() *iris.Application
	Logger() *golog.Logger
	Run(serve iris.Runner, c iris.Configuration)
}

Application .

func NewApplication added in v1.0.5

func NewApplication() Application

NewApplication .

type Component added in v0.0.4

type Component = general.Component

Component .

type GORMRepository

type GORMRepository = general.GORMRepository

GORMRepository .

type Initiator

type Initiator = general.Initiator

Initiator .

type QueryBuilder

type QueryBuilder = general.QueryBuilder

QueryBuilder .

type Repository

type Repository = general.Repository

Repository .

type Runtime

type Runtime = general.Runtime

Runtime .

type SingleBoot added in v1.1.9

type SingleBoot = general.SingleBoot

SingleBoot .

Jump to

Keyboard shortcuts

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