use std::hash::Hash; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use sqlx::PgPool; pub struct GiteratedDiscoveryProtocol { pub pool: PgPool, } #[derive(Debug, Hash, Serialize, Deserialize, Clone, sqlx::Type)] #[sqlx(type_name = "discovery_type", rename_all = "lowercase")] pub enum DiscoveryType { Instance, Repository, } #[derive(Debug, sqlx::FromRow, sqlx::Type)] pub struct DiscoveriesRow { discovery_hash: String, discovery_time: DateTime, discovery_type: DiscoveryType, discovery: String, }