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)
| 1406 | |
| 1407 | // AddNote adds a new note to a notefile, which is a VERY common operation |
| 1408 | func (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 |
| 1422 | func (box *Notebox) AddNoteWithHistory(ctx context.Context, ei *NotefileEventInfo, endpointID string, notefileID string, noteID string, note note.Note) (err error) { |