1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Status types for a `dove request` — the PIN-gated ask for someone else to
//! upload a file to you. `share` run backwards: the link's creator is the
//! eventual receiver. `dove-core` reports these; the CLI and the desktop app
//! render them without needing to know how the gate encodes state on the wire.
//! See [`docs/REQUEST.md`](../docs/REQUEST.md) for the full design.
use Duration;
/// What to create: the ask (description), optional trust metadata (who's
/// asking, why), an optional PIN the gate checks before handing out an
/// upload slot, how long the link stays live, and the upload budget.
/// `SelfHosted::create_request` consumes this; the CLI (and later the desktop
/// app) build it from user input.
/// Where a request stands: nobody's uploaded yet, something arrived, or the
/// one attempt the gate allowed came back bad.
/// One request, enough to identify, describe, and show the state of — what
/// `dove requests` lists and `dove requests get` looks up.
/// The result of creating a request: the id (for the local ledger) and the
/// link to hand to whoever you're asking to upload.