go-common/app/admin/main/videoup/dao/task/dao.go

27 lines
346 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package task
import (
"go-common/app/admin/main/videoup/conf"
"go-common/library/cache/redis"
)
// Dao is track dao.
type Dao struct {
c *conf.Config
// redis
redis *redis.Pool
}
var (
d *Dao
)
// New new a dao.
func New(c *conf.Config) (d *Dao) {
d = &Dao{
c: c,
redis: redis.NewPool(c.Redis.Secondary.Config),
}
return d
}