Tahinli/forge
public0 watching
★ 0
| 1 | //! Push and pull mirrors: the direction enum and the mirror shape. The stored shape is in |
| 2 | //! migrations/0017_mirrors.sql; the store functions live in store/mirrors.rs. |
| 3 | //! |
| 4 | //! A mirror never carries its secret. `has_secret` says whether one is stored; the plaintext is |
| 5 | //! read back only through `Store::mirror_secret`, for the sync worker. |
| 6 | |
| 7 | use crateId; |
| 8 | |
| 9 | /// Which way refs flow. Stored as the `as_str` name. |
| 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 | /// A repo mirror. Has no secret field; see `Store::mirror_secret`. |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | /// Input for `Store::create_mirror`. `secret` is plaintext; the store seals it. |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | /// What `Store::update_mirror` does with the stored secret. |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | /// Most push mirrors one repo may have. |
| 82 | pub const MAX_PUSH_MIRRORS: u32 = 10; |
| 83 | /// Shortest allowed sync interval, in minutes. `0` means manual only. |
| 84 | pub const MIN_INTERVAL_MINUTES: u32 = 10; |
| 85 | /// Default sync interval, in minutes. |
| 86 | pub const DEFAULT_INTERVAL_MINUTES: u32 = 480; |