dao.go 432 B

12345678910111213141516171819202122232425262728
  1. package msg
  2. import (
  3. "go-common/app/admin/main/mcn/conf"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. const (
  7. _msgURL = "/api/notify/send.user.notify.do"
  8. )
  9. // Dao .
  10. type Dao struct {
  11. c *conf.Config
  12. client *bm.Client
  13. msgURL string
  14. }
  15. // New new a Dao and return.
  16. func New(c *conf.Config) (d *Dao) {
  17. d = &Dao{
  18. c: c,
  19. // http client
  20. client: bm.NewClient(c.HTTPClient),
  21. msgURL: c.Host.Msg + _msgURL,
  22. }
  23. return
  24. }