Skip to main content

Module operator_session

Module operator_session 

Source
Expand description

Operator PDS session file (§F1).

The operator is the DID that OWNS the labeler’s PDS account — distinct from moderators (§5.2, §5.3) who authenticate to Cairn. Both use §5.3 file-permission invariants via the shared crate::credential_file helper, but the files are separate: different credentials, different paths, different lifetimes.

Written by cairn operator-login, read by cairn publish-service-record. Path lives in config.operator. session_path — no XDG default because operator ops are deployment- scoped (systemd service, release playbook) rather than user-scoped.

Structs§

OperatorSession
Wire shape of the operator session file. Deliberately narrower than the moderator SessionFile from #16 — operator ops talk to the PDS, not to Cairn, so cairn_server_url / cairn_service_did would be inapplicable and misleading.

Enums§

OperatorSessionError
Error surface for operator-session load/save.

Constants§

OPERATOR_SESSION_VERSION
Current schema version. A load finding a different value refuses to proceed and asks the operator to re-run cairn operator-login.

Functions§

delete
Idempotent file removal — same contract as crate::cli::session::delete.