SetNotefile sets the notefile within the a notehubMessage data structure
(notefile *Notefile)
| 491 | |
| 492 | // SetNotefile sets the notefile within the a notehubMessage data structure |
| 493 | func (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 |
| 508 | func (msg *notehubMessage) GetNotefile() (notefile *Notefile, err error) { |
no test coverage detected