vegapokerbot/internal/integration/factory.go
2024-05-07 21:49:09 +03:00

18 lines
504 B
Go

package integration
import (
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/db/model"
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/integration/iface"
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/integration/null"
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/integration/redmine"
)
func New(dbModel model.Integration) iface.Integration {
switch dbModel.Type {
case model.RedmineIntegration:
return redmine.New(dbModel.Params)
default:
return null.New()
}
}