neko/internal/session/database/manager.go
2020-12-06 17:28:15 +01:00

23 lines
481 B
Go

package database
import (
"demodesk/neko/internal/session/database/dummy"
"demodesk/neko/internal/session/database/file"
"demodesk/neko/internal/session/database/object"
"demodesk/neko/internal/types"
"demodesk/neko/internal/config"
)
func New(config *config.Session) types.MembersDatabase {
switch config.DatabaseAdapter {
case "file":
return file.New(config.FilePath)
case "object":
return object.New()
case "dummy":
return dummy.New()
}
return dummy.New()
}