mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
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:
@@ -34,6 +34,6 @@ sqlx = { version = "0.7.2", features = [
|
||||
ssh-key = "0.6.2"
|
||||
thiserror = "1.0"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
torut = "0.2.1"
|
||||
torut = { git = "https://github.com/Start9Labs/torut.git", branch = "update/dependencies" }
|
||||
tracing = "0.1.39"
|
||||
yasi = "0.1.5"
|
||||
|
||||
@@ -207,6 +207,11 @@ impl Error {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<std::convert::Infallible> for Error {
|
||||
fn from(value: std::convert::Infallible) -> Self {
|
||||
match value {}
|
||||
}
|
||||
}
|
||||
impl From<InvalidId> for Error {
|
||||
fn from(err: InvalidId) -> Self {
|
||||
Error::new(err, ErrorKind::InvalidPackageId)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{ActionId, HealthCheckId, PackageId};
|
||||
use crate::ActionId;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum ProcedureName {
|
||||
|
||||
Reference in New Issue
Block a user