dendrite.nvim/core/handlers/note/goto_note_handler.go
2026-04-14 16:28:56 +02:00

22 lines
470 B
Go

package note
import "github.com/KristianJBorgwarth/dendrite.daemon/persistence/repositories"
type gotoNoteCommand struct {
Slug string `json:"slug"`
}
type gotoNoteResult struct {
Path string `json:"path"`
}
type GotoNoteHandler struct{
noteRepo repositories.INoteRepository
}
func(h *GotoNoteHandler) Handle(command gotoNoteCommand) (gotoNoteResult, error) {
note, err := h.noteRepo.GetBySlug(command.Slug)
if err != nil {
return gotoNoteResult{}, err
}
}