|
|
@ -29,14 +29,13 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
|
|
|
ent.Driver(c.DatabaseConf.NewNoCacheDriver()),
|
|
|
|
ent.Driver(c.DatabaseConf.NewNoCacheDriver()),
|
|
|
|
ent.Debug(), // debug mode
|
|
|
|
ent.Debug(), // debug mode
|
|
|
|
)
|
|
|
|
)
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rds := redis.MustNewRedis(redis.RedisConf{
|
|
|
|
rds := redis.MustNewRedis(redis.RedisConf{
|
|
|
|
Host: c.RedisConf.Addr,
|
|
|
|
Host: c.RedisConf.Addr,
|
|
|
|
Type: c.RedisConf.Type,
|
|
|
|
Type: c.RedisConf.Type,
|
|
|
|
Pass: c.RedisConf.Password,
|
|
|
|
Pass: c.RedisConf.Password,
|
|
|
|
Tls: c.RedisConf.Tls,
|
|
|
|
Tls: c.RedisConf.Tls,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
|
|
return &ServiceContext{
|
|
|
|
return &ServiceContext{
|
|
|
|
Config: c,
|
|
|
|
Config: c,
|
|
|
|