diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-11 21:44:05 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-11 21:44:05 +0800 |
| commit | 762e3119401fbee25ec18fee2ff220d9b12d48e8 (patch) | |
| tree | 26dee88ae37f7d184b693a1a97dad0c89fd0db66 /systems/_constants/src | |
| parent | 2f10e0d94c61916dd36a03df2576223b135b6ccd (diff) | |
Add sheet system and reorganize workspace
- Add new "sheet" crate to workspace
- Rename "systems/asset" to "systems/_asset"
- Reorder workspace members and dependencies for clarity
- Update constants with new paths for auth and rules
- Add conditional compilation for system module
Diffstat (limited to 'systems/_constants/src')
| -rw-r--r-- | systems/_constants/src/lib.rs | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/systems/_constants/src/lib.rs b/systems/_constants/src/lib.rs index 8be9cd8..03ca845 100644 --- a/systems/_constants/src/lib.rs +++ b/systems/_constants/src/lib.rs @@ -15,15 +15,29 @@ pub mod server { #[constants_macros::constants("server_file")] pub mod files { c! { CONFIG = "./config.toml" } + + // Storage location for keys and passwords + c! { KEY = "./auth/key/{member_name}.pem" } + c! { PASSWORD = "./auth/pswd/{member_name}.pswd" } + + // Only Key holders are allowed to initiate Join Request c! { JOIN_REQUEST_KEY = "./.temp/join_requests/{member_name}.pem" } - c! { KEY = "./key/{member_name}.pem" } + + // User metadata is stored here + // Typically includes: + // - Nickname + // - Email + // - Other information + // + // Facilitates queries by other members c! { MEMBER_METADATA = "./meta/{member_name}.toml" } } /// Directory path constants #[constants_macros::constants("server_dir")] pub mod dirs { - c! { KEYS = "./key/" } + c! { KEYS = "./auth/key/" } + c! { PASSWORDS = "./auth/pswd/" } c! { JOIN_REQUEST_KEYS = "./.temp/join_requests/" } c! { MEMBER_METADATAS = "./meta/" } c! { VAULTS = "./v/" } @@ -47,11 +61,8 @@ pub mod vault { // Member sheet backup, only used to temporarily store a member's local workspace file structure, fully controlled by the corresponding member c! { MEMBER_SHEET_BACKUP = "./_member/{member_name}/backups/{sheet_name}.sheet" } - // Share sent to a reference sheet, selectively merged into that reference sheet by a Host - c! { SHARE_TO_REF = "./req/{ref_sheet_name}/{share_id}.sheet" } - - // Share sent to a specific member, fully controlled by that member, who can optionally merge it into any of their own sheets - c! { SHARE_TO_MEMBER = "./_member/{member_name}/shares/{share_id}.sheet" } + // ### Rules ### + c! { IGNORE_RULE_SCRIPT = "./rules/ignore/{script_name}.lua" } // ### Storages ### c! { CHANGE_FILE = "./changes/CURRENT" } @@ -74,10 +85,9 @@ pub mod vault { #[constants_macros::constants("vault_dir")] pub mod dirs { c! { REFSHEETS = "./ref/" } - c! { SHARES_TO_REF = "./req/{ref_sheet_name}/" } c! { MEMBER = "./_member/{member_name}/" } c! { MEMBER_SHEET_BACKUPS = "./_member/{member_name}/backups/" } - c! { MEMBER_SHARES = "./_member/{member_name}/shares/" } + c! { IGNORE_RULES = "./rules/ignore/" } c! { CHANGES = "./changes/" } } } |
