Documentation ¶
Index ¶
- Constants
- func DumpAttributes(n ast.Node, source []byte) map[string]interface{}
- func DumpToMap(node ast.Node, source []byte, root string) *map[string]interface{}
- func PrefixAttributeName(prefix, name string) string
- func Serialize(notebook *Notebook, outputMetadata *document.RunmeMetadata, opts Options) ([]byte, error)
- type Cell
- type CellExecutionSummary
- type CellKind
- type CellOutput
- type CellOutputItem
- type CellOutputProcessInfo
- type ExecutionSummaryTiming
- type Notebook
- type Options
- type ProcessInfoExitReason
- type TextRange
Constants ¶
View Source
const ( InternalAttributePrefix = "runme.dev" PrivateAttributePrefix = "_" )
View Source
const ( FrontmatterKey = "frontmatter" DocumentID = "id" )
Variables ¶
This section is empty.
Functions ¶
func PrefixAttributeName ¶
Types ¶
type Cell ¶
type Cell struct { Kind CellKind `json:"kind"` Value string `json:"value"` LanguageID string `json:"languageId"` Metadata map[string]string `json:"metadata,omitempty"` Outputs []*CellOutput `json:"outputs,omitempty"` TextRange *TextRange `json:"textRange,omitempty"` ExecutionSummary *CellExecutionSummary `json:"executionSummary,omitempty"` }
Cell resembles NotebookCellData from VS Code. https://github.com/microsoft/vscode/blob/085c409898bbc89c83409f6a394e73130b932add/src/vscode-dts/vscode.d.ts#L13715
type CellExecutionSummary ¶
type CellExecutionSummary struct { ExecutionOrder uint32 `json:"executionSummary"` Success bool `json:"success"` Timing *ExecutionSummaryTiming `json:"timing,omitempty"` }
type CellOutput ¶
type CellOutput struct { Items []*CellOutputItem `json:"items"` Metadata map[string]string `json:"metadata,omitempty"` ProcessInfo *CellOutputProcessInfo `json:"processInfo"` }
type CellOutputItem ¶
type CellOutputProcessInfo ¶
type CellOutputProcessInfo struct { ExitReason *ProcessInfoExitReason `json:"exitReason"` Pid int64 `json:"pid"` }
type ExecutionSummaryTiming ¶
type Notebook ¶
type Notebook struct { Cells []*Cell `json:"cells"` Metadata map[string]string `json:"metadata,omitempty"` Frontmatter *document.Frontmatter `json:"frontmatter,omitempty"` }
Notebook resembles NotebookData form VS Code. https://github.com/microsoft/vscode/blob/085c409898bbc89c83409f6a394e73130b932add/src/vscode-dts/vscode.d.ts#L13767
func (*Notebook) ForceLifecycleIdentities ¶
func (n *Notebook) ForceLifecycleIdentities()
This mimics what otherwise would happen in the extension
type Options ¶ added in v3.4.1
type Options struct { IdentityResolver *identity.IdentityResolver LoggerInstance *zap.Logger }
type ProcessInfoExitReason ¶
Click to show internal directories.
Click to hide internal directories.