Feature/remove postgres (#2570)

* wip: move postgres data to patchdb

* wip

* wip

* wip

* complete notifications and clean up warnings

* fill in user agent

* move os tor bindings to single call
This commit is contained in:
Aiden McClelland
2024-03-07 14:40:22 -07:00
committed by GitHub
parent a17ec4221b
commit e0c9f8a5aa
70 changed files with 2429 additions and 2383 deletions

View File

@@ -2,6 +2,7 @@ use std::path::Path;
use std::str::FromStr;
use serde::{Deserialize, Deserializer, Serialize};
use yasi::InternedString;
use crate::{Id, InvalidId};
@@ -18,6 +19,16 @@ impl From<Id> for HostId {
Self(id)
}
}
impl From<HostId> for Id {
fn from(value: HostId) -> Self {
value.0
}
}
impl From<HostId> for InternedString {
fn from(value: HostId) -> Self {
value.0.into()
}
}
impl std::fmt::Display for HostId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", &self.0)

View File

@@ -59,6 +59,11 @@ impl TryFrom<&str> for Id {
}
}
}
impl From<Id> for InternedString {
fn from(value: Id) -> Self {
value.0
}
}
impl std::ops::Deref for Id {
type Target = str;
fn deref(&self) -> &Self::Target {

View File

@@ -3,6 +3,7 @@ use std::path::Path;
use std::str::FromStr;
use serde::{Deserialize, Serialize, Serializer};
use yasi::InternedString;
use crate::{Id, InvalidId, SYSTEM_ID};
@@ -22,6 +23,16 @@ impl From<Id> for PackageId {
PackageId(id)
}
}
impl From<PackageId> for Id {
fn from(value: PackageId) -> Self {
value.0
}
}
impl From<PackageId> for InternedString {
fn from(value: PackageId) -> Self {
value.0.into()
}
}
impl std::ops::Deref for PackageId {
type Target = str;
fn deref(&self) -> &Self::Target {