Contextualise all the things ....

This commit is contained in:
Micheal Wilkinson
2026-03-17 21:59:40 +00:00
parent dd718c9a73
commit 5c53e7e968
4 changed files with 30 additions and 25 deletions

View File

@@ -1,17 +1,18 @@
package repository
import (
"context"
"git.hrafn.xyz/aether/notes/internal/models"
)
// NoteStore defines the interface for persisting and retrieving notes.
type NoteStore interface {
// SaveNote saves a note to the store and returns the saved note.
SaveNote(models.Note) (models.Note, error)
SaveNote(context.Context, models.Note) (models.Note, error)
// GetNoteByID retrieves a note by its ID.
GetNoteByID(int) (models.Note, error)
GetNoteByID(context.Context, int) (models.Note, error)
// GetAllNotes retrieves all notes from the store.
GetAllNotes() ([]models.Note, error)
GetAllNotes(context.Context) ([]models.Note, error)
// DeleteNoteByID deletes a note by its ID.
DeleteNoteByID(int) error
DeleteNoteByID(context.Context, int) error
}