sourcecheck

package
v1.169.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sourcecheck holds the checks a drawn source passes before it is stored: a Graphviz DOT source (#2303), a Vega-Lite specification (#2296), a D2 diagram (#2302), an Excalidraw scene (#2306) and a Lottie animation (#2308).

The portal draws each in the reader's browser, so the source decides what that browser does. A DOT source that does not parse would store an asset that draws nothing, and a Vega-Lite spec naming a URL would make every reader's browser fetch it. Both are refused here, before anything is written, by every door a source can be stored through: save_asset, manage_asset, the portal's REST writes and a script's platform.export.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(contentType, body string) error

Check refuses a source of a drawn content type that cannot be stored, and returns nil for a source that can and for every other content type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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