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.
25 lines
596 B
25 lines
596 B
package config
|
|
|
|
import (
|
|
"git.aiterp.net/lucifer/new-server/internal/drivers"
|
|
"git.aiterp.net/lucifer/new-server/internal/drivers/hue"
|
|
"git.aiterp.net/lucifer/new-server/internal/drivers/lifx"
|
|
"git.aiterp.net/lucifer/new-server/internal/drivers/nanoleaf"
|
|
"git.aiterp.net/lucifer/new-server/models"
|
|
"sync"
|
|
)
|
|
|
|
var dp models.DriverProvider
|
|
var dpOnce sync.Once
|
|
|
|
func DriverProvider() models.DriverProvider {
|
|
dpOnce.Do(func() {
|
|
dp = drivers.DriverMap{
|
|
models.DTNanoLeaf: &nanoleaf.Driver{},
|
|
models.DTHue: &hue.Driver{},
|
|
models.DTLIFX: &lifx.Driver{},
|
|
}
|
|
})
|
|
|
|
return dp
|
|
}
|