Documentation
¶
Index ¶
- Variables
- func ContentAPIHandler(w http.ResponseWriter, req *http.Request)
- func ContentCreateAPIHandler(w http.ResponseWriter, req *http.Request)
- func ContentDeleteAPIHandler(w http.ResponseWriter, req *http.Request)
- func ContentRenameAPIHandler(w http.ResponseWriter, req *http.Request)
- func ContentUpdateAPIHandler(w http.ResponseWriter, req *http.Request)
- func CreateDirectory(payload ContentPayload) models.ContentModel
- func GetContent(relativePath string, contentType string, format string, hash int) models.ContentModel
- func GetKernelPath(path string) int
- func GetOSPath(path string) string
- func HandleWatchWebSocket(w http.ResponseWriter, req *http.Request)
- func IsDir(path string) bool
- func NewErrorResponse(w http.ResponseWriter, i int, s string)
- func SetUpActiveWatcherConnections() map[string]*ContentWatchConnection
- func UpdateContent(path, ftype, format, content string) error
- func UpdateNbContent(path, ftype, format string, content interface{}) error
- type Cell
- type CellDisk
- type ContentPayload
- type ContentRequestBody
- type ContentUpdateRequest
- type ContentWatchConnection
- type Notebook
- type NotebookDisk
- type Output
- type OutputDisk
- type RenameContentPayload
Constants ¶
This section is empty.
Variables ¶
View Source
var ZasperActiveWatcherConnections map[string]*ContentWatchConnection
Functions ¶
func ContentAPIHandler ¶
func ContentAPIHandler(w http.ResponseWriter, req *http.Request)
func ContentCreateAPIHandler ¶
func ContentCreateAPIHandler(w http.ResponseWriter, req *http.Request)
func ContentDeleteAPIHandler ¶
func ContentDeleteAPIHandler(w http.ResponseWriter, req *http.Request)
func ContentRenameAPIHandler ¶
func ContentRenameAPIHandler(w http.ResponseWriter, req *http.Request)
func ContentUpdateAPIHandler ¶
func ContentUpdateAPIHandler(w http.ResponseWriter, req *http.Request)
func CreateDirectory ¶
func CreateDirectory(payload ContentPayload) models.ContentModel
func GetContent ¶
func GetKernelPath ¶
func HandleWatchWebSocket ¶
func HandleWatchWebSocket(w http.ResponseWriter, req *http.Request)
HandleWatchWebSocket handles WebSocket connections and manages the lifecycle of a terminal session.
func NewErrorResponse ¶
func NewErrorResponse(w http.ResponseWriter, i int, s string)
func SetUpActiveWatcherConnections ¶
func SetUpActiveWatcherConnections() map[string]*ContentWatchConnection
func UpdateContent ¶
func UpdateNbContent ¶
Types ¶
type CellDisk ¶
type CellDisk struct { Source []string `json:"source"` ExecutionCount int `json:"execution_count"` CellType string `json:"cell_type"` Attachments map[string]interface{} `json:"attachments"` Outputs []OutputDisk `json:"outputs"` Metadata map[string]interface{} `json:"metadata"` }
Cell struct for handling individual cells in a notebook
type ContentPayload ¶
type ContentRequestBody ¶
type ContentUpdateRequest ¶
type ContentWatchConnection ¶
type Notebook ¶
type Notebook struct { Cells []Cell `json:"cells"` Metadata map[string]interface{} `json:"metadata"` }
Notebook struct that is rendered as json to outside world
type NotebookDisk ¶
type NotebookDisk struct { Cells []CellDisk `json:"cells"` Metadata map[string]interface{} `json:"metadata"` }
Notebook struct to be stored on disk
type Output ¶
type Output struct { OutputType string `json:"output_type"` ExecutionCount int `json:"execution_count"` Data map[string]string `json:"data"` Text string `json:"text"` Metadata map[string]interface{} `json:"metadata"` // in case of error traceback Ename string `json:"ename"` Evalue string `json:"evalue"` Traceback []string `json:"traceback"` }
type OutputDisk ¶
type OutputDisk struct { OutputType string `json:"output_type"` ExecutionCount int `json:"execution_count"` Data map[string]interface{} `json:"data"` Text []string `json:"text"` Metadata map[string]interface{} `json:"metadata"` // in case of error traceback Ename string `json:"ename"` Evalue string `json:"evalue"` Traceback []string `json:"traceback"` }
Output struct for handling cell outputs
type RenameContentPayload ¶
Click to show internal directories.
Click to hide internal directories.