dao.go 537 B

123456789101112131415161718192021222324
  1. package message
  2. import (
  3. "go-common/app/admin/main/growup/conf"
  4. xhttp "go-common/library/net/http/blademaster"
  5. )
  6. // Dao is message dao
  7. type Dao struct {
  8. c *conf.Config
  9. uri, creativeURL string
  10. client *xhttp.Client
  11. }
  12. // New a message dao
  13. func New(c *conf.Config) (d *Dao) {
  14. d = &Dao{
  15. c: c,
  16. client: xhttp.NewClient(c.HTTPClient),
  17. uri: c.Host.Message + "/api/notify/send.user.notify.do",
  18. creativeURL: c.Host.Creative + "/x/internal/creative/join/growup/account",
  19. }
  20. return
  21. }