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

Function NewNote

pkg/cli/database/models.go:46–57  ·  view source on GitHub ↗

NewNote constructs a note with the given data

(uuid, bookUUID, body string, addedOn, editedOn int64, usn int, deleted, dirty bool)

Source from the content-addressed store, hash-verified

44
45// NewNote constructs a note with the given data
46func NewNote(uuid, bookUUID, body string, addedOn, editedOn int64, usn int, deleted, dirty bool) Note {
47 return Note{
48 UUID: uuid,
49 BookUUID: bookUUID,
50 Body: body,
51 AddedOn: addedOn,
52 EditedOn: editedOn,
53 USN: usn,
54 Deleted: deleted,
55 Dirty: dirty,
56 }
57}
58
59// Insert inserts a new note
60func (n Note) Insert(db *DB) error {

Callers 4

stepSyncNoteFunction · 0.92
fullSyncNoteFunction · 0.92
writeNoteFunction · 0.92
TestNewNoteFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNewNoteFunction · 0.68