func (storage *Storage) GetAllWithPrefix(prefix string) (map[string]string, error) {
	entries := make(map[string]string)
	iter := storage.db.NewIterator(util.BytesPrefix([]byte(prefix)), nil)
	for iter.Next() {
		key := iter.Key()
		value := iter.Value()
		entries[string(key)] = string(value)
	}
	iter.Release()
	err = errors.E(errors.Op("Get all with prefix using iterator"), iter.Error())
	return entries, err
}
GetAllWithPrefix returns all entries in the database with the specified prefix
package leveldb
import (
	"github.com/sprawl/sprawl/errors"
	"github.com/syndtr/goleveldb/leveldb"
	util "github.com/syndtr/goleveldb/leveldb/util"
)
type Storage struct {
	dbPath string
	db     *leveldb.DB
}
var err error
var data []byte
func (storage *Storage) SetDbPath(dbPath string) {
	storage.dbPath = dbPath
}
func (storage *Storage) Run() error {
	storage.db, err = leveldb.OpenFile(storage.dbPath, nil)
	return err
}
func (storage *Storage) Close() {
	storage.db.Close()
}
func (storage *Storage) Has(key []byte) (bool, error) {
	return storage.db.Has(key, nil)
}
func (storage *Storage) Get(key []byte) ([]byte, error) {
	return storage.db.Get(key, nil)
}
func (storage *Storage) Put(key []byte, data []byte) error {
	return storage.db.Put(key, data, nil)
}
func (storage *Storage) Delete(key []byte) error {
	return storage.db.Delete(key, nil)
}
func (storage *Storage) GetAll() (map[string]string, error) {
	entries := make(map[string]string)
	iter := storage.db.NewIterator(nil, nil)
	for iter.Next() {
		key := iter.Key()
		value := iter.Value()
		entries[string(key)] = string(value)
	}
	iter.Release()
	err = errors.E(errors.Op("Get all using iterator"), iter.Error())
	return entries, err
}