service.go 772 B

12345678910111213141516171819202122232425262728293031323334
  1. package danmu
  2. import (
  3. "go-common/app/interface/main/creative/conf"
  4. "go-common/app/interface/main/creative/dao/account"
  5. "go-common/app/interface/main/creative/dao/archive"
  6. "go-common/app/interface/main/creative/dao/danmu"
  7. "go-common/app/interface/main/creative/dao/elec"
  8. "go-common/app/interface/main/creative/dao/subtitle"
  9. "go-common/app/interface/main/creative/service"
  10. )
  11. // Service danmu.
  12. type Service struct {
  13. c *conf.Config
  14. dm *danmu.Dao
  15. arc *archive.Dao
  16. acc *account.Dao
  17. sub *subtitle.Dao
  18. elec *elec.Dao
  19. }
  20. // New get danmu service.
  21. func New(c *conf.Config, rpcdaos *service.RPCDaos) *Service {
  22. s := &Service{
  23. c: c,
  24. dm: danmu.New(c),
  25. acc: rpcdaos.Acc,
  26. arc: rpcdaos.Arc,
  27. sub: rpcdaos.Sub,
  28. elec: elec.New(c),
  29. }
  30. return s
  31. }