Documentation
¶
Index ¶
- Variables
- type LocalDBEngine
- func (e *LocalDBEngine) Close() error
- func (e *LocalDBEngine) CreateNote(content, headline string, tags []string) (models.Note, error)
- func (e *LocalDBEngine) DeleteNote(noteId utils.NoteId) error
- func (e *LocalDBEngine) Initialize(dbPath string, options map[string]string) error
- func (e *LocalDBEngine) ListNotes(tags []string) ([]*models.Note, error)
- func (e *LocalDBEngine) ReadNote(noteId utils.NoteId) (*models.Note, error)
- func (e *LocalDBEngine) SearchNotes(query string) ([]*models.Note, error)
- func (e *LocalDBEngine) UpdateNote(noteId utils.NoteId, content, headline string, tags []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBucketNotFound = errors.New("bucket not found")
ErrBucketNotFound is returned when the specified bucket does not exist
Functions ¶
This section is empty.
Types ¶
type LocalDBEngine ¶
type LocalDBEngine struct {
// contains filtered or unexported fields
}
func NewLocalDBEngine ¶
func NewLocalDBEngine() *LocalDBEngine
NewLocalDBEngine creates a new instance of LocalDBEngine
func (*LocalDBEngine) Close ¶
func (e *LocalDBEngine) Close() error
Close the engine and release resources
func (*LocalDBEngine) CreateNote ¶
CreateNote creates a new note in the local database
func (*LocalDBEngine) DeleteNote ¶
func (e *LocalDBEngine) DeleteNote(noteId utils.NoteId) error
DeleteNote deletes a note by ID from the local database
func (*LocalDBEngine) Initialize ¶
func (e *LocalDBEngine) Initialize(dbPath string, options map[string]string) error
Initialize the engine with a database connection
func (*LocalDBEngine) ListNotes ¶
func (e *LocalDBEngine) ListNotes(tags []string) ([]*models.Note, error)
ListNotes lists all notes in the local database with optional filters
func (*LocalDBEngine) SearchNotes ¶
func (e *LocalDBEngine) SearchNotes(query string) ([]*models.Note, error)
SearchNotes searches notes by content or headline in the local database
func (*LocalDBEngine) UpdateNote ¶
func (e *LocalDBEngine) UpdateNote(noteId utils.NoteId, content, headline string, tags []string) error
UpdateNote updates an existing note in the local database
Click to show internal directories.
Click to hide internal directories.