JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Completely refactor project structure

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨ae8ff44

⁨giterated-models/src/messages/discovery.rs⁩ - ⁨568⁩ bytes
Raw
1 use chrono::{DateTime, Utc};
2 use serde::{Deserialize, Serialize};
3
4 use crate::model::discovery::DiscoveryItem;
5
6 #[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)]
7 pub struct DiscoveryOffer {
8 pub earliest: DateTime<Utc>,
9 pub hashes: Vec<u128>,
10 }
11
12 #[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)]
13 pub struct DiscoveryRequest {
14 pub since: DateTime<Utc>,
15 pub hashes: Vec<u128>,
16 }
17
18 #[derive(Clone, Hash, PartialEq, Eq, Debug, Serialize, Deserialize)]
19 pub struct Discoveries {
20 pub discoveries: Vec<DiscoveryItem>,
21 }
22