MCPcopy Index your code
hub / github.com/dnote/dnote / PresentNote

Function PresentNote

pkg/server/presenters/note.go:49–67  ·  view source on GitHub ↗

PresentNote presents note

(note database.Note)

Source from the content-addressed store, hash-verified

47
48// PresentNote presents note
49func PresentNote(note database.Note) Note {
50 ret := Note{
51 UUID: note.UUID,
52 CreatedAt: FormatTS(note.CreatedAt),
53 UpdatedAt: FormatTS(note.UpdatedAt),
54 Body: note.Body,
55 AddedOn: note.AddedOn,
56 USN: note.USN,
57 Book: NoteBook{
58 UUID: note.Book.UUID,
59 Label: note.Book.Label,
60 },
61 User: NoteUser{
62 UUID: note.User.UUID,
63 },
64 }
65
66 return ret
67}
68
69// PresentNotes presents notes
70func PresentNotes(notes []database.Note) []Note {

Callers 6

V3ShowMethod · 0.92
V3CreateMethod · 0.92
V3DeleteMethod · 0.92
V3UpdateMethod · 0.92
TestPresentNoteFunction · 0.85
PresentNotesFunction · 0.85

Calls 1

FormatTSFunction · 0.85

Tested by 1

TestPresentNoteFunction · 0.68