From ee7cba690582b9c47e8c856bf0bd331eedda7908 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 6 Oct 2025 04:11:58 +0800 Subject: Remove old vcs directory after migration to vcs_data - Delete entire crates/vcs directory and its contents - Remove test files and configuration from old structure - Complete transition to new vcs_data and vcs_actions architecture --- crates/vcs/src/data/local/config.rs | 53 ------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 crates/vcs/src/data/local/config.rs (limited to 'crates/vcs/src/data/local/config.rs') diff --git a/crates/vcs/src/data/local/config.rs b/crates/vcs/src/data/local/config.rs deleted file mode 100644 index 5444047..0000000 --- a/crates/vcs/src/data/local/config.rs +++ /dev/null @@ -1,53 +0,0 @@ -use cfg_file::ConfigFile; -use serde::{Deserialize, Serialize}; -use std::net::SocketAddr; - -use crate::constants::CLIENT_FILE_WORKSPACE; -use crate::constants::PORT; -use crate::data::member::MemberId; - -#[derive(Serialize, Deserialize, ConfigFile)] -#[cfg_file(path = CLIENT_FILE_WORKSPACE)] -pub struct LocalConfig { - /// The upstream address, representing the upstream address of the local workspace, - /// to facilitate timely retrieval of new updates from the upstream source. - upstream_addr: SocketAddr, - - /// The member ID used by the current local workspace. - /// This ID will be used to verify access permissions when connecting to the upstream server. - using_account: MemberId, -} - -impl Default for LocalConfig { - fn default() -> Self { - Self { - upstream_addr: SocketAddr::V4(std::net::SocketAddrV4::new( - std::net::Ipv4Addr::new(127, 0, 0, 1), - PORT, - )), - using_account: "unknown".to_string(), - } - } -} - -impl LocalConfig { - /// Set the vault address. - pub fn set_vault_addr(&mut self, addr: SocketAddr) { - self.upstream_addr = addr; - } - - /// Get the vault address. - pub fn vault_addr(&self) -> SocketAddr { - self.upstream_addr - } - - /// Set the currently used account - pub fn set_current_account(&mut self, account: MemberId) { - self.using_account = account; - } - - /// Get the currently used account - pub fn current_account(&self) -> MemberId { - self.using_account.clone() - } -} -- cgit