forked from MTSR/mapserver
16 lines
322 B
Go
16 lines
322 B
Go
package playerdb
|
|
|
|
import (
|
|
"errors"
|
|
"mapserver/worldconfig"
|
|
)
|
|
|
|
func Create(cfg *worldconfig.WorldConfig) (DBAccessor, error) {
|
|
switch cfg.PlayerBackend {
|
|
case worldconfig.BACKEND_FILES:
|
|
return &FilePlayerDB{}, nil
|
|
default:
|
|
return nil, errors.New("player backend not supported: " + worldconfig.BACKEND_FILES)
|
|
}
|
|
}
|