func (r *memoryDatabase) ClearDatabase() error {
	r.mtx.Lock()
	defer r.mtx.Unlock()
	memoryInstance.presets = map[string]types.Preset{}
	memoryInstance.jobs = map[string]types.Job{}
	return nil
}
ClearDatabase clears the database
package db
import (
	"errors"
	"github.com/snickers/snickers/types"
	"sync"
)
type memoryDatabase struct {
	mtx sync.RWMutex
	presets map[string]types.Preset
	jobs    map[string]types.Job
}
var databaseInit sync.Once
var memoryInstance *memoryDatabase
func getMemoryDatabase() (Storage, error) {
	databaseInit.Do(func() {
		memoryInstance = &memoryDatabase{}
		memoryInstance.presets = map[string]types.Preset{}
		memoryInstance.jobs = map[string]types.Job{}
	})
	return memoryInstance, nil
}