dao.go 361 B

1234567891011121314151617181920212223
  1. package dao
  2. import (
  3. "go-common/app/job/main/account-recovery/conf"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. // Dao dao
  7. type Dao struct {
  8. c *conf.Config
  9. // httpClient
  10. httpClient *bm.Client
  11. }
  12. // New init mysql db
  13. func New(c *conf.Config) (dao *Dao) {
  14. dao = &Dao{
  15. c: c,
  16. // httpClient
  17. httpClient: bm.NewClient(c.HTTPClientConfig),
  18. }
  19. return
  20. }