func GetOrCreateDB(dbFileName string) (*DB, error) {
	db, err := bolt.Open(dbFileName, 0600, nil)
	if err != nil {
		return nil, err
	}
	err = db.Update(func(tx *bolt.Tx) error {
		_, err := tx.CreateBucketIfNotExists([]byte("Notebook"))
		if err != nil {
			return fmt.Errorf("could not create root bucket: %v", err)
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	return &DB{db}, nil
}
<Constructor for above DB struct>
Returns an instance of DB struct by either creating a new BoltDb
bucket for given `dbFileName` or using an existing one
@param dbFileName string The complete (path) qualified filename of for BoltDb file
@return (*DB, error) Tuple containing pointer to DB struct and optionally an error
package models
import (
	"fmt"
	"github.com/boltdb/bolt"
)
type Datastore interface {
	NotebookExists(notebookName string) (bool, error)
	GetNotebook(notebookName string) (Notebook, error)
	GetAllNotebooks() ([]Notebook, error)
	GetAllNotebookNames() ([]string, error)
	AddNotebook(notebook Notebook) error
	RmNotebook(notebookName string) error
	NoteExists(notebookName string, noteId uint64) (bool, error)
	GetNote(notebookName string, noteId uint64) (Note, error)
	AddNotes(notebookName string, noteContents ...string) error
	DeleteNotes(notebookName string, noteIDs ...uint64) error
	Dump()
}
type DB struct {
	*bolt.DB
}