Documentation
¶
Overview ¶
Package viewonly is what a person who may only watch a machine reaches there (docs/hub/own-work.md, «Levels»). The hub applies it to every request of such a person, which also covers machines that run an older runtime; the runtime applies it again to a session the hub asked for as a watcher's.
Both lists are allow-lists of what the watching page asks for: a route that is not here is closed. Routes that hand over files of the machine (downloads, previews, the file pane, notebooks, the folder browser), terminals, secrets, settings of agents and the preview of the owner's dev servers are left out on purpose.
Index ¶
Constants ¶
const Level = "view"
Level is the value of a session's "level" claim for a watcher.
Variables ¶
This section is empty.
Functions ¶
func Message ¶
Message is a message of a watcher's page on the socket at path, rewritten to what may go on to the runtime; false drops it. The type is read from the key "type" exactly, as the runtime reads it, and the message is written anew without any other spelling of that key, so both sides read the same one.
func MessageType ¶
MessageType says a message of this type from a watcher's page may be acted on.
func Readable ¶
Readable says a watcher may read (GET, HEAD, OPTIONS) the runtime's path: path is the decoded path without the runtime's mount, escaped the same request's path as it was written. Outside /api lie the page and its files.
Types ¶
This section is empty.