diff --git a/Cargo.lock b/Cargo.lock index b7aa8f0..c3b1af1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1120,7 +1120,26 @@ dependencies = [ "hex", "kuska-handshake", "kuska-sodiumoxide", - "kuska-ssb", + "kuska-ssb 0.4.0", + "serde 1.0.136", + "serde_json", + "sha2", +] + +[[package]] +name = "golgi" +version = "0.1.4" +source = "git+https://git.coopcloud.tech/golgi-ssb/golgi.git?branch=dev#6daddeab9e3d48713b2e29d2437535ad6cedb84d" +dependencies = [ + "async-std", + "async-stream 0.3.3", + "base64 0.13.0", + "futures 0.3.21", + "hex", + "kuska-handshake", + "kuska-sodiumoxide", + "kuska-ssb 0.4.1", + "log 0.4.16", "serde 1.0.136", "serde_json", "sha2", @@ -1726,6 +1745,28 @@ dependencies = [ "thiserror", ] +[[package]] +name = "kuska-ssb" +version = "0.4.1" +source = "git+https://github.com/mhfowler/kuska-ssb.git#48adac914fd2288abcc267560c5a3e013a072003" +dependencies = [ + "async-std", + "async-stream 0.2.1", + "base64 0.11.0", + "dirs 2.0.2", + "futures 0.3.21", + "get_if_addrs", + "hex", + "kuska-handshake", + "kuska-sodiumoxide", + "log 0.4.16", + "once_cell", + "regex", + "serde 1.0.136", + "serde_json", + "thiserror", +] + [[package]] name = "kv-log-macro" version = "1.0.7" @@ -2431,7 +2472,7 @@ dependencies = [ "chrono", "dirs 4.0.0", "fslock", - "golgi", + "golgi 0.1.1", "jsonrpc-client-core", "jsonrpc-client-http", "jsonrpc-core 8.0.1", @@ -2525,7 +2566,7 @@ dependencies = [ "dirs 4.0.0", "env_logger 0.8.4", "futures 0.3.21", - "golgi", + "golgi 0.1.4", "lazy_static", "log 0.4.16", "maud", diff --git a/peach-lib/src/sbot.rs b/peach-lib/src/sbot.rs index 4fffc5c..35f869f 100644 --- a/peach-lib/src/sbot.rs +++ b/peach-lib/src/sbot.rs @@ -2,7 +2,7 @@ use std::{fs, fs::File, io, io::Write, path::PathBuf, process::Command, str}; -use crate::config_manager::get_config_value; +use crate::config_manager; use serde::{Deserialize, Serialize}; use crate::error::PeachError; @@ -67,7 +67,7 @@ impl SbotStatus { // because non-privileged users are able to run systemctl show let info_output = Command::new("systemctl") .arg("show") - .arg(get_config_value("GO_SBOT_SERVICE")?) + .arg(config_manager::get_config_value("GO_SBOT_SERVICE")?) .arg("--no-page") .output()?; @@ -89,7 +89,7 @@ impl SbotStatus { // because non-privileged users are able to run systemctl status let status_output = Command::new("systemctl") .arg("status") - .arg(get_config_value("GO_SBOT_SERVICE")?) + .arg(config_manager::get_config_value("GO_SBOT_SERVICE")?) .output()?; let service_status = str::from_utf8(&status_output.stdout)?; @@ -128,7 +128,7 @@ impl SbotStatus { } // get path to blobstore - let blobstore_path = format!("{}/blobs/sha256", get_config_value("GO_SBOT_DATADIR")?); + let blobstore_path = format!("{}/blobs/sha256", config_manager::get_config_value("GO_SBOT_DATADIR")?); // determine the size of the blobstore directory in bytes status.blobstore = dir_size(blobstore_path).ok(); @@ -200,7 +200,7 @@ impl SbotConfig { /// Read the go-sbot `config.toml` file from file and deserialize into `SbotConfig`. pub fn read() -> Result { // determine path of user's go-sbot config.toml - let config_path = format!("{}/config.toml", get_config_value("GO_SBOT_DATADIR")?); + let config_path = format!("{}/config.toml", config_manager::get_config_value("GO_SBOT_DATADIR")?); let config_contents = fs::read_to_string(config_path)?; @@ -217,7 +217,7 @@ impl SbotConfig { let config_string = toml::to_string(&config)?; // determine path of user's go-sbot config.toml - let config_path = format!("{}/config.toml", get_config_value("GO_SBOT_DATADIR")?); + let config_path = format!("{}/config.toml", config_manager::get_config_value("GO_SBOT_DATADIR")?); // open config file for writing let mut file = File::create(config_path)?; diff --git a/peach-web/Cargo.toml b/peach-web/Cargo.toml index 239588f..053bfbb 100644 --- a/peach-web/Cargo.toml +++ b/peach-web/Cargo.toml @@ -39,8 +39,8 @@ chrono = "0.4" dirs = "4.0" env_logger = "0.8" futures = "0.3" -#golgi = { git = "https://git.coopcloud.tech/golgi-ssb/golgi.git", branch = "dev" } -golgi = { git = "https://git.coopcloud.tech/golgi-ssb/golgi.git" } +golgi = { git = "https://git.coopcloud.tech/golgi-ssb/golgi.git", branch = "dev" } +#golgi = { git = "https://git.coopcloud.tech/golgi-ssb/golgi.git" } lazy_static = "1.4" log = "0.4" maud = "0.23"