sourcecheck

package
v1.162.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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