Added NoteStore interface, mock and repository with Create method
This commit is contained in:
19
internal/repository/notes.go
Normal file
19
internal/repository/notes.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.hrafn.xyz/aether/notes/internal/models"
|
||||
)
|
||||
|
||||
type NoteRepository struct {
|
||||
store NoteStore
|
||||
}
|
||||
|
||||
func NewNoteRepository(store NoteStore) *NoteRepository {
|
||||
return &NoteRepository{store: store}
|
||||
}
|
||||
|
||||
func (r *NoteRepository) CreateNote(content string) (models.Note, error) {
|
||||
return models.Note{}, fmt.Errorf("not implemented")
|
||||
}
|
||||
Reference in New Issue
Block a user