dao.go 407 B

12345678910111213141516171819202122
  1. package dm
  2. import (
  3. "go-common/app/job/main/activity/conf"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. // Dao dao struct.
  7. type Dao struct {
  8. // http
  9. broadcastURL string
  10. httpCli *bm.Client
  11. }
  12. // New return dm dao instance.
  13. func New(c *conf.Config) (d *Dao) {
  14. d = &Dao{
  15. broadcastURL: "http://api.bilibili.co/x/internal/chat/push/room",
  16. httpCli: bm.NewClient(c.HTTPClient),
  17. }
  18. return
  19. }