common

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlainText    = "text/plain"
	MarkdownText = "text/markdown"
	Stdout       = "application/vnd.jupyter.stdout" // Custom mime-type for stream output to stdout.
	Stderr       = "application/vnd.jupyter.stderr" // Custom mime-type for stream output to stderr.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MultilineString

type MultilineString []string

MultilineString stores multi-line text as strings or string arrays in the raw JSON. TODO(optimization): check if we can scan into [][]byte directly

func (MultilineString) Text

func (s MultilineString) Text() (txt []byte)

Text concatenates all lines in a multiline string into a single byte slice.

func (*MultilineString) UnmarshalJSON

func (s *MultilineString) UnmarshalJSON(data []byte) error

type Notebook

type Notebook struct {
	VersionMajor int               `json:"nbformat"`
	VersionMinor int               `json:"nbformat_minor"`
	Metadata     json.RawMessage   `json:"metadata"` // TODO: omitempty
	Cells        []json.RawMessage `json:"cells"`
}

func (*Notebook) Version

func (n *Notebook) Version() schema.Version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL