freedom

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 8

README

freedom

License Go Report Card Build Status GoDoc QQ群

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 app.BindController or app.BindControllerByParty.

func Configure added in v0.0.3

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

Configure .

func CreateH2CRunner

func CreateH2CRunner(addr string) iris.Runner

CreateH2CRunner -

func InstallGorm

func InstallGorm(f func() (db *gorm.DB, cache gcache.Plugin))

InstallGorm .

func InstallRedis

func InstallRedis(f func() (client *redis.Client))

InstallRedis .

func Logger

func Logger() *golog.Logger

Logger .

func Run

func Run(serve iris.Runner, c *iris.Configuration)

Run .

func UseMiddleware

func UseMiddleware(handler iris.Handler)

UseMiddleware .

Types

type Application

type Application = general.Application

Application .

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