dao.go 346 B

1234567891011121314151617181920212223242526
  1. package task
  2. import (
  3. "go-common/app/admin/main/videoup/conf"
  4. "go-common/library/cache/redis"
  5. )
  6. // Dao is track dao.
  7. type Dao struct {
  8. c *conf.Config
  9. // redis
  10. redis *redis.Pool
  11. }
  12. var (
  13. d *Dao
  14. )
  15. // New new a dao.
  16. func New(c *conf.Config) (d *Dao) {
  17. d = &Dao{
  18. c: c,
  19. redis: redis.NewPool(c.Redis.Secondary.Config),
  20. }
  21. return d
  22. }