You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
693 B

4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. package config
  2. import (
  3. "git.aiterp.net/lucifer/new-server/internal/drivers"
  4. "git.aiterp.net/lucifer/new-server/internal/drivers/hue"
  5. "git.aiterp.net/lucifer/new-server/internal/drivers/lifx"
  6. "git.aiterp.net/lucifer/new-server/internal/drivers/mill"
  7. "git.aiterp.net/lucifer/new-server/internal/drivers/nanoleaf"
  8. "git.aiterp.net/lucifer/new-server/models"
  9. "sync"
  10. )
  11. var dp models.DriverProvider
  12. var dpOnce sync.Once
  13. func DriverProvider() models.DriverProvider {
  14. dpOnce.Do(func() {
  15. dp = drivers.DriverMap{
  16. models.DTNanoLeaf: &nanoleaf.Driver{},
  17. models.DTHue: &hue.Driver{},
  18. models.DTLIFX: &lifx.Driver{},
  19. models.DTMill: &mill.Driver{},
  20. }
  21. })
  22. return dp
  23. }