@@ -17,9 +17,13 @@
 
 package storage
 
+import "github.com/asdine/storm"
+
 // Storage stores persistent objects for future usage
 type Storage interface {
 	Store(issuer string, data interface{}) error
+	GetAll(issuer string, data interface{}) error
 	Delete(issuer string, data interface{}) error
 	Close() error
+	GetDB() *storm.DB
 }
/*
 * Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package storage

// Storage stores persistent objects for future usage
type Storage interface {
	Store(issuer string, data interface{}) error
	Delete(issuer string, data interface{}) error
	Close() error
}

this makes the whole interface rather useless. The storage is now coupled to storm DB. If we change the storage, we'll still have to implement a getdb method that returns a storm db. If you absolutely must have the "GetDB" method, you should then have the method return an interface{} and cast it to the specific DB driver on the consumer side(for instance, tests). In this case I don't think we even need the GetDB