Documentation
¶
Index ¶
- Variables
- func Init(ctx context.Context, opts ...Option) (func(), error)
- func InitAuth() (auth.Auther, func(), error)
- func InitCasbin(adapter persist.Adapter) (*casbin.SyncedEnforcer, func(), error)
- func InitGinEngine(r router.IRouter) *gin.Engine
- func InitGormDB() (*gorm.DB, func(), error)
- func InitHTTPServer(ctx context.Context, handler http.Handler) func()
- func InitLogger() (func(), error)
- func InitMonitor(ctx context.Context) func()
- func InitRedisCli() (redis.Cmdable, func(), error)
- func InitVcode(cli redis.Cmdable) *vcode.Vcode
- func NewGormDB() (*gorm.DB, func(), error)
- func NewRedisCli() (redis.Cmdable, func(), error)
- func Run(ctx context.Context, opts ...Option) error
- type Injector
- type Option
Constants ¶
This section is empty.
Variables ¶
InjectorSet 注入Injector
Functions ¶
func InitCasbin ¶
func InitCasbin(adapter persist.Adapter) (*casbin.SyncedEnforcer, func(), error)
InitCasbin 初始化casbin
func InitHTTPServer ¶
InitHTTPServer 初始化http服务
func InitRedisCli ¶ added in v1.0.2
func NewRedisCli ¶ added in v1.0.2
Types ¶
type Injector ¶
type Injector struct {
Engine *gin.Engine
Auth auth.Auther
CasbinEnforcer *casbin.SyncedEnforcer
MenuSrv *service.Menu
RedisCli redis.Cmdable
}
Injector 注入器(用于初始化完成之后的引用)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
model
|
|
|
module
|
|
|
Package test 接口测试 使用方式: go test -v
|
Package test 接口测试 使用方式: go test -v |
Click to show internal directories.
Click to hide internal directories.