Skip to main content

pacenotes_server/
reports.rs

1//! Conflict reports from installers: two selected packages wrote the same
2//! file, the later one won, and only the operator can fix the catalogue.
3//!
4//! An unauthenticated write, so the body is capped, every field validated,
5//! nothing echoed, the rate limited per client and overall, and storage is
6//! append-only lines. Nothing stored identifies a user: the client address
7//! the limiter needs stays in memory.
8
9mod cidr;
10mod client_address;
11mod overlap_summary;
12mod rate_limiter;
13mod report_file;
14mod report_log;
15mod validation;
16
17pub use cidr::Cidr;
18pub use client_address::client_ip;
19pub use overlap_summary::{overlap_warnings, SUMMARY_DAYS};
20pub use rate_limiter::{Limits, RateLimiter};
21pub use report_file::{file_name, utc_date};
22pub use report_log::{Record, Reports};
23pub use validation::{
24    validate, Validated, MAX_BODY_BYTES, MAX_CONFLICTS, MAX_FILE_BYTES, MAX_INSTALLER_LEN,
25    MAX_PACKAGES, MIN_PACKAGES,
26};