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 InitEntClient() (*ent.Client, func(), error)
- func InitGinEngine(r router.IRouter) *gin.Engine
- func InitHTTPServer(ctx context.Context, handler http.Handler) func()
- func InitInfluxDB() (influxdb2.Client, func(), error)
- func InitLogger() (func(), error)
- func InitMonitor(ctx context.Context) func()
- func InitRabbitMQ() (*amqp.Connection, func(), error)
- func InitRedisCli() (redis.Cmdable, func(), error)
- func InitVcode(cli redis.Cmdable) *vcode.Vcode
- func NewEntClient() (*ent.Client, 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 ¶
InitCasbin 初始化casbin
func InitEntClient ¶ added in v1.0.6
InitGormDB 初始化gorm存储
func InitHTTPServer ¶
InitHTTPServer 初始化http服务
func InitInfluxDB ¶ added in v1.0.6
func InitRabbitMQ ¶ added in v1.0.6
func InitRabbitMQ() (*amqp.Connection, func(), error)
func InitRedisCli ¶ added in v1.0.2
func NewEntClient ¶ added in v1.0.6
NewGormDB 创建DB实例
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 ¶
Click to show internal directories.
Click to hide internal directories.