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.

29 lines
790 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/hue2"
  6. "git.aiterp.net/lucifer/new-server/internal/drivers/lifx"
  7. "git.aiterp.net/lucifer/new-server/internal/drivers/mill"
  8. "git.aiterp.net/lucifer/new-server/internal/drivers/nanoleaf"
  9. "git.aiterp.net/lucifer/new-server/models"
  10. "sync"
  11. )
  12. var dp models.DriverProvider
  13. var dpOnce sync.Once
  14. func DriverProvider() models.DriverProvider {
  15. dpOnce.Do(func() {
  16. dp = drivers.DriverMap{
  17. models.DTNanoLeaf: &nanoleaf.Driver{},
  18. models.DTHue: &hue.Driver{},
  19. models.DTHue2: &hue2.Driver{},
  20. models.DTLIFX: &lifx.Driver{},
  21. models.DTMill: &mill.Driver{},
  22. }
  23. })
  24. return dp
  25. }