dao.go 603 B

123456789101112131415161718192021222324252627282930313233
  1. package staff
  2. import (
  3. "go-common/app/admin/main/videoup/conf"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. const (
  7. _staffListURL = "/videoup/staff"
  8. _staffSubmitURL = "/videoup/staff/apply/batch"
  9. )
  10. // Dao is search dao
  11. type Dao struct {
  12. c *bm.ClientConfig
  13. httpClient *bm.Client
  14. staffURI string
  15. submitUrl string
  16. }
  17. var (
  18. d *Dao
  19. )
  20. // New new staff dao
  21. func New(c *conf.Config) *Dao {
  22. return &Dao{
  23. c: c.HTTPClient.Read,
  24. httpClient: bm.NewClient(c.HTTPClient.Read),
  25. staffURI: c.Host.Archive + _staffListURL,
  26. submitUrl: c.Host.Archive + _staffSubmitURL,
  27. }
  28. }