Expand description
Core library for passalong, a lightweight cross-platform clipboard and
file sharing tool.
This crate holds everything a front-end needs that is independent of the command line: configuration, the item model, storage traits, and telemetry. It must never depend on CLI or terminal crates so that future GUI and Android front-ends can reuse it.
Modules§
- api_key
- A passalong-server API key:
pal_<key id>_<secret>, a bearer credential for one workspace. It is kept inserver.https.api_key_fileunder the rules of the store’s key file: written owner-only, refused when others may read it or when it sits in a git work tree that does not ignore it. - cache
- A local copy of the store’s item list, so
listandchoosecan show it without connecting.servekeeps it current; see the architecture document. - clipboard
- Clipboard access behind a trait, so commands and
servecan be tested withtesting::MockClipboard(available with thetestingfeature), and GUI or Android front-ends can supply their own implementation. - clock
- Time source abstraction, so time-dependent code is deterministic in tests.
- config
- Configuration: discovery, parsing, defaults, and validation.
- crypto
- Client-side encryption: the key hierarchy, key wrapping, the keyed content key, and sealed metadata and content.
- download
- Writing items to local files: verified writes and download naming,
shared by
passalong loadand pull mode. - encryption
- Encrypted stores on the client side: the store header, the key file that holds a device’s copy of a store’s data key, and opening a store as plaintext or sealed, as its header says.
- fs
- Minimal filesystem surface shared by every file-based backend.
- model
- Item model: content keys, time-sortable item ids, and item metadata.
- random
- Non-cryptographic randomness for correlation ids and temporary names.
- retention
- Choosing which items
prunedeletes. - serve
passalong serve: send every new clipboard text and every file dropped into the drop folder, until told to stop.- store
- Storage: the backend-agnostic
Storetrait and its implementations. - telemetry
- Logging: syslog-compatible single-line records with correlation ids.
- testing
- Test doubles for passalong’s external interfaces.
Constants§
- VERSION
- Version of this crate, shared by every crate in the workspace.