Liking cljdoc? Tell your friends :D

hive-artcraft.transport.control-file

JVM client for a :control-file-shaped app (PdfCraft --control <FILE>). The app listens on a RANDOM loopback port and writes {port, token} to a user-owned file. Each request reads that file again, connects, sends the token first (JSON-RPC auth), then one ui.* request. The token is held in a Redacted box that prints as <redacted>; no error, log line or return value of this namespace ever carries its value (memory axiom 20260504113116-48076a09).

JVM client for a :control-file-shaped app (PdfCraft `--control <FILE>`). The app listens on a
RANDOM loopback port and writes {port, token} to a user-owned file. Each request reads that
file again, connects, sends the token first (JSON-RPC `auth`), then one ui.* request.
The token is held in a Redacted box that prints as <redacted>; no error, log line or return
value of this namespace ever carries its value (memory axiom 20260504113116-48076a09).
raw docstring

adviceclj

How to start PdfCraft so its control file is trustworthy.

How to start PdfCraft so its control file is trustworthy.
sourceraw docstring

control-file-maxclj

Most a control file may hold (the app writes under 100 bytes).

Most a control file may hold (the app writes under 100 bytes).
sourceraw docstring

control-file-problemclj

(control-file-problem owner me perms)

Why user me cannot trust a control file with this owner and rwx perms string, or nil.

Why user `me` cannot trust a control file with this `owner` and rwx `perms` string, or nil.
sourceraw docstring

control-file-transportclj

(control-file-transport config)

Build a transport for an app started with --control <FILE>; config overrides default-config.

Build a transport for an app started with --control <FILE>; config overrides default-config.
sourceraw docstring

default-configclj

Loopback host and per-request connect and read bounds; :control-file comes from the app config.

Loopback host and per-request connect and read bounds; :control-file comes from the app config.
sourceraw docstring

expand-homeclj

(expand-home path)

Expand a leading ~/ to the user's home directory; other paths pass through.

Expand a leading ~/ to the user's home directory; other paths pass through.
sourceraw docstring

read-control-fileclj

(read-control-file path)

Read {port, token} from the app's control file; refuse a symlink, a non-regular file, a file another user owns or can access, and an oversized one. The token comes back as a Redacted box.

Read {port, token} from the app's control file; refuse a symlink, a non-regular file, a file
another user owns or can access, and an oversized one. The token comes back as a Redacted box.
sourceraw docstring

read-trusted-fileclj

(read-trusted-file path advice missing)

Read a small secret file as text: refuse a symlink, a non-regular file, a file another user owns or can access, and one over control-file-max. Every refusal names path and ends with advice; a missing file says missing (path: missing advice). Never returns or reports the contents in a refusal.

Read a small secret file as text: refuse a symlink, a non-regular file, a file another user owns
or can access, and one over control-file-max. Every refusal names `path` and ends with `advice`;
a missing file says `missing` (`path: missing advice`). Never returns or reports the contents
in a refusal.
sourceraw docstring

rpc-replyclj

(rpc-reply reply)

Translate a decoded JSON-RPC reply into the {ok, result|error} shape core/response-line checks.

Translate a decoded JSON-RPC reply into the {ok, result|error} shape core/response-line checks.
sourceraw docstring

rpc-requestclj

(rpc-request request)

JSON-RPC 2.0 envelope for one validated {:id :method :params} control request.

JSON-RPC 2.0 envelope for one validated {:id :method :params} control request.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close