initialize

package
v0.0.0-...-7699bbc Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InjectorSet = wire.NewSet(wire.Struct(new(Injector), "*"))

InjectorSet 注入Injector

Functions

func InitAuth

func InitAuth() (auth.Auther, func(), error)

InitAuth 初始化用户认证

func InitCaptcha

func InitCaptcha()

InitCaptcha 初始化图形验证码

func InitCasbin

func InitCasbin(adapter persist.Adapter) (*casbin.SyncedEnforcer, func(), error)

InitCasbin 初始化casbin

func InitGinEngine

func InitGinEngine(r router.IRouter) *gin.Engine

InitGinEngine 初始化gin引擎

func InitGormDB

func InitGormDB() (*gorm.DB, func(), error)

InitGormDB 初始化gorm存储

func InitHTTPServer

func InitHTTPServer(ctx context.Context, handler http.Handler) func()

InitHTTPServer 初始化http服务

func InitLogger

func InitLogger() (func(), error)

InitLogger 初始化日志模块

func InitMongo

func InitMongo() (*mongo.Client, func(), error)

InitMongo 初始化mongo存储

func InitMonitor

func InitMonitor(ctx context.Context)

InitMonitor 初始化服务监控

func NewGormDB

func NewGormDB() (*gorm.DB, func(), error)

NewGormDB 创建DB实例

Types

type Injector

type Injector struct {
	Engine         *gin.Engine
	Auth           auth.Auther
	CasbinEnforcer *casbin.SyncedEnforcer
	Menu           *data.Menu
}

Injector 注入器(用于初始化完成之后的引用)

func BuildInjector

func BuildInjector() (*Injector, func(), error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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