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

Method SetNotefile

lib/wire.go:493–505  ·  view source on GitHub ↗

SetNotefile sets the notefile within the a notehubMessage data structure

(notefile *Notefile)

Source from the content-addressed store, hash-verified

491
492// SetNotefile sets the notefile within the a notehubMessage data structure
493func (msg *notehubMessage) SetNotefile(notefile *Notefile) error {
494 // Set compressed form
495 JSON, err := note.JSONMarshal(notefile)
496 if err != nil {
497 return err
498 }
499 if msg.cf == nil {
500 msg.cf = &cf{}
501 }
502 msg.cf.Notefile, err = jsonCompress(JSON)
503
504 return err
505}
506
507// GetNotefile gets the notefile from within the a notehubMessage data structure
508func (msg *notehubMessage) GetNotefile() (notefile *Notefile, err error) {

Callers 6

hubWebRequestFunction · 0.80
hubGetNotificationFunction · 0.80
hubDiscoveryFunction · 0.80
hubNoteboxChangesFunction · 0.80
hubNotefileChangesFunction · 0.80
hubReadFileFunction · 0.80

Calls 1

jsonCompressFunction · 0.85

Tested by

no test coverage detected