freedom

package module
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 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 代码生成

安装

$ 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))
	InstallRedis(f func() (client *redis.Client))
	InstallMiddleware(handler iris.Handler)
	CreateH2CRunner(addr string) iris.Runner
	Iris() *iris.Application
	Logger() *golog.Logger
	Run(serve iris.Runner, c iris.Configuration)
}

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 .

Jump to

Keyboard shortcuts

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