initialize

package
v0.0.0-...-63da727 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Discard = New(log.New(ioutil.Discard, "", log.LstdFlags), dbConfig{})
	Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), dbConfig{
		SlowThreshold: 200 * time.Millisecond,
		LogLevel:      logger.Warn,
		Colorful:      true,
	})
	Recorder = traceRecorder{Interface: Default, BeginAt: time.Now()}
)

Functions

func LoadConfig

func LoadConfig()

LoadConfig 加载配置文件

func LoadDb

func LoadDb()

LoadDb 加载数据库

func LoadLog

func LoadLog()

LoadLog 加载日志

func LoadMongodb

func LoadMongodb()

LoadMongodb 加载mongo

func LoadRedis

func LoadRedis()

LoadRedis 加载redis

func New

func New(writer logger.Writer, config dbConfig) logger.Interface

func RegisterRouter

func RegisterRouter() *gin.Engine

RegisterRouter 注册路由

Types

This section is empty.

Jump to

Keyboard shortcuts

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