make map driver type for faster tests
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
)
|
||||
|
||||
type Driver interface {
|
||||
Count(context.Context, string, interface{}) (int, error)
|
||||
Find(context.Context, string, interface{}) (chan bson.Raw, error)
|
||||
Update(context.Context, string, interface{}, interface{}) error
|
||||
Insert(context.Context, string, interface{}) error
|
||||
@@ -20,6 +21,8 @@ func New(path ...string) Driver {
|
||||
path = []string{config.New().DBURI}
|
||||
}
|
||||
switch strings.ToLower(config.New().DriverType) {
|
||||
case "map":
|
||||
return NewMap()
|
||||
case "mongo":
|
||||
return NewMongo(path[0])
|
||||
case "boltdb":
|
||||
|
||||
Reference in New Issue
Block a user