Added NoteStore interface, mock and repository with Create method

This commit is contained in:
Micheal Wilkinson
2026-03-17 20:49:50 +00:00
parent 9cb33137fe
commit c05603d624
4 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package repository_test
import (
"git.hrafn.xyz/aether/notes/internal/models"
)
type mockNoteStore struct {
notes []models.Note
}
func (m *mockNoteStore) SaveNote(note models.Note) (models.Note, error) {
note.ID = len(m.notes) + 1
m.notes = append(m.notes, note)
return note, nil
}