MCPcopy Index your code
hub / github.com/gopherdata/gophernotes / PublishDisplayData

Method PublishDisplayData

messages.go:289–300  ·  view source on GitHub ↗

PublishDisplayData publishes a single image.

(data Data)

Source from the content-addressed store, hash-verified

287
288// PublishDisplayData publishes a single image.
289func (receipt *msgReceipt) PublishDisplayData(data Data) error {
290 // copy Data in a struct with appropriate json tags
291 return receipt.Publish("display_data", struct {
292 Data MIMEMap `json:"data"`
293 Metadata MIMEMap `json:"metadata"`
294 Transient MIMEMap `json:"transient"`
295 }{
296 Data: data.Data,
297 Metadata: ensure(data.Metadata),
298 Transient: ensure(data.Transient),
299 })
300}
301
302const (
303 // StreamStdout defines the stream name for standard out on the front-end. It

Callers

nothing calls this directly

Calls 2

PublishMethod · 0.95
ensureFunction · 0.85

Tested by

no test coverage detected