func (db *DB) GetNote(notebookName string, noteId uint64) (Note, error) {
	var note Note
	err := db.View(func(tx *bolt.Tx) error {
		reqNoteIdBytes := []byte(strconv.FormatUint(noteId, 10))
		notebookBucket := tx.Bucket([]byte("Notebook")).Bucket([]byte(notebookName))
		foundNoteIdBytes, foundNoteContentBytes := notebookBucket.Cursor().Seek(reqNoteIdBytes)
		if foundNoteIdBytes != nil && bytes.Equal(reqNoteIdBytes, foundNoteIdBytes) {
			return json.Unmarshal(foundNoteContentBytes, &note)
		}
		return nil
	})
	return note, err
}
Retreives note with a given id
param: uint64 noteId
return: (Note, error)
package models
import (
	"bytes"
	"encoding/json"
	"strconv"
	"github.com/boltdb/bolt"
)
type Note struct {
	Id      uint64 `json:"id"`
	Content string `json:"content"`
}
func (db *DB) NoteExists(notebookName string, noteId uint64) (bool, error) {
	noteExists := false
	err := db.View(func(tx *bolt.Tx) error {
		reqNoteIdBytes := []byte(strconv.FormatUint(noteId, 10))
		notebookBucket := tx.Bucket([]byte("Notebook")).Bucket([]byte(notebookName))
		foundNoteIdBytes, _ := notebookBucket.Cursor().Seek(reqNoteIdBytes)
		if foundNoteIdBytes != nil && bytes.Equal(reqNoteIdBytes, foundNoteIdBytes) {
			noteExists = true
		}
		return nil
	})
	return noteExists, err
}