Merge branch 'master' into copy-language-code
This commit is contained in:
@@ -23,17 +23,17 @@ type StorageServices interface {
|
||||
GetPersister(ctx context.Context) (*persist.Persister, error)
|
||||
GetUserdataDb(ctx context.Context) (db.Db, error)
|
||||
GetResource(ctx context.Context) (resource.Resource, error)
|
||||
EnsureDbDir() error
|
||||
}
|
||||
|
||||
type StorageService struct {
|
||||
svc *storage.MenuStorageService
|
||||
}
|
||||
|
||||
func NewStorageService(dbDir string) *StorageService {
|
||||
return &StorageService{
|
||||
svc: storage.NewMenuStorageService(dbDir, ""),
|
||||
func NewStorageService(conn storage.ConnData) (*StorageService, error) {
|
||||
svc := &StorageService{
|
||||
svc: storage.NewMenuStorageService(conn, ""),
|
||||
}
|
||||
return svc, nil
|
||||
}
|
||||
|
||||
func(ss *StorageService) GetPersister(ctx context.Context) (*persist.Persister, error) {
|
||||
@@ -47,7 +47,3 @@ func(ss *StorageService) GetUserdataDb(ctx context.Context) (db.Db, error) {
|
||||
func(ss *StorageService) GetResource(ctx context.Context) (resource.Resource, error) {
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func(ss *StorageService) EnsureDbDir() error {
|
||||
return ss.svc.EnsureDbDir()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user