muses

package module
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 20 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

1 介绍

Muses是希腊神话九位古老文艺女神的总称。正如她 所具有的功能一样,里面拥有各种GO具有艺术性的组件。

拥有了Muses,你就能够快速愉快的启动你的项目。

2 功能点

Muses是一个配置驱动组件的启动器,你可以将他很方便的与其他框架gin、echo、beego、iris结合起来使用,能够通过几行配置,立刻使用以下功能

2.1 命令行

  • 启动器命令行
  • 版本信息命令行
  • [x]自定义命令行

2.2 数据库

  • mysql
  • [x]postgresql
  • [x]mongodb

2.3 缓存

  • redis
  • leveldb
  • gocache

2.4 日志

  • zap

2.5 对象存储

  • 阿里oss
  • 本地file

2.6 服务

  • gin
  • echo

2.7 模板引擎

  • beego

2.8 session

  • redis ginsession
  • memory ginsession
  • redis echosession

2.9 注册中心

  • etcd
  • zookeeper

2.10 监控

  • prometheus

2.11 JWT

  • mysql
  • redis
  • file
  • memory

2.12 工具

  • 验证码

3 文档

Muses文档

4 参考

5 加入我们

wechat

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MUSES_DEBUG = false
)

Functions

This section is empty.

Types

type Muses

type Muses struct {
	// contains filtered or unexported fields
}

func Container

func Container(callerFuncs ...common.CallerFunc) (muses *Muses)

注册相应组件

func (*Muses) Run

func (m *Muses) Run() (err error)

func (*Muses) SetCfg

func (m *Muses) SetCfg(cfg interface{}) *Muses

设置配置

func (*Muses) SetGinRouter

func (m *Muses) SetGinRouter(router func() *ogin.Engine) *Muses

设置gin路由

func (*Muses) SetPostRun

func (m *Muses) SetPostRun(f ...common.PostRunFunc) *Muses

在container之后运行

func (*Muses) SetPreRun

func (m *Muses) SetPreRun(f ...common.PreRunFunc) *Muses

在container之前运行

func (*Muses) SetRootCommand

func (m *Muses) SetRootCommand(f func(cobraCommand *cobra.Command))

func (*Muses) SetStartCommand

func (m *Muses) SetStartCommand(f func(cobraCommand *cobra.Command))

Jump to

Keyboard shortcuts

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