service.go 601 B

1234567891011121314151617181920212223242526272829
  1. package relation
  2. import (
  3. "go-common/app/interface/main/app-interface/conf"
  4. accdao "go-common/app/interface/main/app-interface/dao/account"
  5. livedao "go-common/app/interface/main/app-interface/dao/live"
  6. reldao "go-common/app/interface/main/app-interface/dao/relation"
  7. )
  8. // Service is favorite.
  9. type Service struct {
  10. c *conf.Config
  11. // dao
  12. accDao *accdao.Dao
  13. relDao *reldao.Dao
  14. liveDao *livedao.Dao
  15. }
  16. // New new favorite。
  17. func New(c *conf.Config) (s *Service) {
  18. s = &Service{
  19. c: c,
  20. // dao
  21. accDao: accdao.New(c),
  22. relDao: reldao.New(c),
  23. liveDao: livedao.New(c),
  24. }
  25. return s
  26. }