MCPcopy Create free account
hub / github.com/blues/note / AddNote

Method AddNote

lib/notebox.go:1408–1419  ·  view source on GitHub ↗

AddNote adds a new note to a notefile, which is a VERY common operation

(ctx context.Context, ei *NotefileEventInfo, endpointID string, notefileID string, noteID string, note note.Note)

Source from the content-addressed store, hash-verified

1406
1407// AddNote adds a new note to a notefile, which is a VERY common operation
1408func (box *Notebox) AddNote(ctx context.Context, ei *NotefileEventInfo, endpointID string, notefileID string, noteID string, note note.Note) (err error) {
1409 openfile, file, err := box.OpenNotefile(ctx, notefileID)
1410 if err != nil {
1411 return err
1412 }
1413
1414 _, err = file.AddNote(ctx, ei, endpointID, noteID, note)
1415
1416 openfile.Close(ctx)
1417
1418 return err
1419}
1420
1421// AddNoteWithHistory adds a new note to a notefile, with history supplied
1422func (box *Notebox) AddNoteWithHistory(ctx context.Context, ei *NotefileEventInfo, endpointID string, notefileID string, noteID string, note note.Note) (err error) {

Callers 7

initNoteboxFunction · 0.45
hubWebRequestFunction · 0.45
hubGetNotificationFunction · 0.45
hubDiscoveryFunction · 0.45
hubReadFileFunction · 0.45
testNoteboxFunction · 0.45
testNotefileFunction · 0.45

Calls 2

OpenNotefileMethod · 0.95
CloseMethod · 0.45

Tested by 2

testNoteboxFunction · 0.36
testNotefileFunction · 0.36