Skip to main content

Crate passalong_core

Crate passalong_core 

Source
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 in server.https.api_key_file under 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 list and choose can show it without connecting. serve keeps it current; see the architecture document.
clipboard
Clipboard access behind a trait, so commands and serve can be tested with testing::MockClipboard (available with the testing feature), 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 load and 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 prune deletes.
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 Store trait 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.