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

Method SetPayload

lib/wire.go:644–656  ·  view source on GitHub ↗

SetPayload sets the payload within the a notehubMessage data structure

(payload []byte)

Source from the content-addressed store, hash-verified

642
643// SetPayload sets the payload within the a notehubMessage data structure
644func (msg *notehubMessage) SetPayload(payload []byte) {
645 // Set native form
646 if msg.nf == nil {
647 msg.nf = &nf{}
648 }
649 msg.nf.Payload = &payload
650
651 // Set compressed form
652 if msg.cf == nil {
653 msg.cf = &cf{}
654 }
655 msg.cf.Payload = payload
656}
657
658// GetPayload gets the payload from within the a notehubMessage
659func (msg *notehubMessage) GetPayload() (payload []byte) {

Callers 4

hubWebRequestFunction · 0.80
hubGetNotificationFunction · 0.80
hubNotefileUpdateNoteFunction · 0.80
hubReadFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected