diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-06 22:10:15 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-06 22:10:15 +0800 |
| commit | 759221a3001504cfd5c758e4fa70d4c2dac4e07c (patch) | |
| tree | a30765b5e57ac24b0b7c7e5c81de2586e5fe07fe /crates/vcs_data/src/data/vault.rs | |
| parent | 62dd79cea8bfc0b6af95049d8a0187dd2380b09c (diff) | |
feat: Enhanced data structures and constants
- Add new constants for local workspace management
- Extend SheetData with write_count functionality
- Simplify vault data structures
- Update sheet and virtual file data handling
Diffstat (limited to 'crates/vcs_data/src/data/vault.rs')
| -rw-r--r-- | crates/vcs_data/src/data/vault.rs | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/crates/vcs_data/src/data/vault.rs b/crates/vcs_data/src/data/vault.rs index efb4eec..fedebb3 100644 --- a/crates/vcs_data/src/data/vault.rs +++ b/crates/vcs_data/src/data/vault.rs @@ -6,6 +6,7 @@ use std::{ }; use cfg_file::config::ConfigFile; +use vcs_docs::docs::READMES_VAULT_README; use crate::{ constants::{ @@ -94,53 +95,7 @@ impl Vault { .await?; // Final, generate README.md - let readme_content = format!( - "\ -# JustEnoughVCS Server Setup - -This directory contains the server configuration and data for `JustEnoughVCS`. - -## User Authentication -To allow users to connect to this server, place their public keys in the `{}` directory. -Each public key file should be named `{{member_id}}.pem` (e.g., `juliet.pem`), and contain the user's public key in PEM format. - -**ECDSA:** -```bash -openssl genpkey -algorithm ed25519 -out your_name_private.pem -openssl pkey -in your_name_private.pem -pubout -out your_name.pem -``` - -**RSA:** -```bash -openssl genpkey -algorithm RSA -out your_name_private.pem -pkeyopt rsa_keygen_bits:2048 -openssl pkey -in your_name_private.pem -pubout -out your_name.pem -``` - -**DSA:** -```bash -openssl genpkey -algorithm DSA -out your_name_private.pem -pkeyopt dsa_paramgen_bits:2048 -openssl pkey -in your_name_private.pem -pubout -out your_name.pem -``` - -Place only the `your_name.pem` file in the server's `./key/` directory, renamed to match the user's member ID. - -## File Storage -All version-controlled files (Virtual File) are stored in the `{}` directory. - -## License -This software is distributed under the MIT License. For complete license details, please see the main repository homepage. - -## Support -Repository: `https://github.com/JustEnoughVCS/VersionControl` -Please report any issues or questions on the GitHub issue tracker. - -## Thanks :) -Thank you for using `JustEnoughVCS!` - ", - SERVER_PATH_MEMBER_PUB, SERVER_PATH_VF_ROOT - ) - .trim() - .to_string(); + let readme_content = READMES_VAULT_README; fs::write(vault_path.join(SERVER_FILE_README), readme_content)?; Ok(()) |
