dao.go 431 B

123456789101112131415161718192021222324
  1. package pgc
  2. import (
  3. "go-common/app/interface/main/tv/conf"
  4. "go-common/library/cache/memcache"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. // Dao is account dao.
  8. type Dao struct {
  9. conf *conf.Config
  10. client *bm.Client
  11. mc *memcache.Pool
  12. }
  13. // New account dao.
  14. func New(c *conf.Config) (d *Dao) {
  15. d = &Dao{
  16. conf: c,
  17. client: bm.NewClient(c.HTTPClient),
  18. mc: memcache.NewPool(c.Memcache.Config),
  19. }
  20. return
  21. }