service.go 505 B

123456789101112131415161718192021222324252627
  1. package search
  2. import (
  3. "go-common/app/interface/main/tv/conf"
  4. arcdao "go-common/app/interface/main/tv/dao/archive"
  5. cmsDao "go-common/app/interface/main/tv/dao/cms"
  6. "go-common/app/interface/main/tv/dao/search"
  7. )
  8. // Service .
  9. type Service struct {
  10. conf *conf.Config
  11. dao *search.Dao
  12. arcDao *arcdao.Dao
  13. cmsDao *cmsDao.Dao
  14. }
  15. // New .
  16. func New(c *conf.Config) *Service {
  17. srv := &Service{
  18. conf: c,
  19. dao: search.New(c),
  20. arcDao: arcdao.New(c),
  21. cmsDao: cmsDao.New(c),
  22. }
  23. return srv
  24. }