upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 08:04:48 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 13:30:59 +0100
commit949c6459aa7683453a7160423b689ceadb08954b (patch)
tree230c26ecb11b99916e5570e548673eb09ecf0a36 /src
parenta825311f2c55661aaab3a163bda9109295c96044 (diff)
refactor: organise into lib and bin structure
the make the code more readable this commit just moves the files, the next commit should fix the imports
Diffstat (limited to 'src')
-rw-r--r--src/bin/git_remote_nostr/main.rs (renamed from src/git_remote_helper.rs)0
-rw-r--r--src/bin/ngit/cli.rs (renamed from src/cli.rs)0
-rw-r--r--src/bin/ngit/main.rs (renamed from src/main.rs)10
-rw-r--r--src/bin/ngit/sub_commands/fetch.rs (renamed from src/sub_commands/fetch.rs)0
-rw-r--r--src/bin/ngit/sub_commands/init.rs (renamed from src/sub_commands/init.rs)0
-rw-r--r--src/bin/ngit/sub_commands/list.rs (renamed from src/sub_commands/list.rs)0
-rw-r--r--src/bin/ngit/sub_commands/login.rs (renamed from src/sub_commands/login.rs)0
-rw-r--r--src/bin/ngit/sub_commands/mod.rs (renamed from src/sub_commands/mod.rs)0
-rw-r--r--src/bin/ngit/sub_commands/pull.rs (renamed from src/sub_commands/pull.rs)0
-rw-r--r--src/bin/ngit/sub_commands/push.rs (renamed from src/sub_commands/push.rs)0
-rw-r--r--src/bin/ngit/sub_commands/send.rs (renamed from src/sub_commands/send.rs)0
-rw-r--r--src/key_handling/mod.rs1
-rw-r--r--src/lib/cli_interactor.rs (renamed from src/cli_interactor.rs)0
-rw-r--r--src/lib/client.rs (renamed from src/client.rs)0
-rw-r--r--src/lib/git/mod.rs (renamed from src/git.rs)0
-rw-r--r--src/lib/login/key_encryption.rs (renamed from src/key_handling/encryption.rs)0
-rw-r--r--src/lib/login/mod.rs (renamed from src/login.rs)0
-rw-r--r--src/lib/login/user.rs (renamed from src/config.rs)0
-rw-r--r--src/lib/mod.rs16
-rw-r--r--src/lib/repo_ref.rs (renamed from src/repo_ref.rs)0
-rw-r--r--src/lib/repo_state.rs (renamed from src/repo_state.rs)0
21 files changed, 18 insertions, 9 deletions
diff --git a/src/git_remote_helper.rs b/src/bin/git_remote_nostr/main.rs
index a5244bf..a5244bf 100644
--- a/src/git_remote_helper.rs
+++ b/src/bin/git_remote_nostr/main.rs
diff --git a/src/cli.rs b/src/bin/ngit/cli.rs
index d0f934e..d0f934e 100644
--- a/src/cli.rs
+++ b/src/bin/ngit/cli.rs
diff --git a/src/main.rs b/src/bin/ngit/main.rs
index e833e4a..97e5981 100644
--- a/src/main.rs
+++ b/src/bin/ngit/main.rs
@@ -7,14 +7,8 @@ use clap::Parser;
7use cli::{Cli, Commands}; 7use cli::{Cli, Commands};
8 8
9mod cli; 9mod cli;
10mod cli_interactor; 10use ngit::*;
11mod client; 11
12mod config;
13mod git;
14mod key_handling;
15mod login;
16mod repo_ref;
17mod repo_state;
18mod sub_commands; 12mod sub_commands;
19 13
20#[tokio::main] 14#[tokio::main]
diff --git a/src/sub_commands/fetch.rs b/src/bin/ngit/sub_commands/fetch.rs
index b1e83c5..b1e83c5 100644
--- a/src/sub_commands/fetch.rs
+++ b/src/bin/ngit/sub_commands/fetch.rs
diff --git a/src/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs
index 5b7e03d..5b7e03d 100644
--- a/src/sub_commands/init.rs
+++ b/src/bin/ngit/sub_commands/init.rs
diff --git a/src/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs
index ac1f4ab..ac1f4ab 100644
--- a/src/sub_commands/list.rs
+++ b/src/bin/ngit/sub_commands/list.rs
diff --git a/src/sub_commands/login.rs b/src/bin/ngit/sub_commands/login.rs
index 8a3788f..8a3788f 100644
--- a/src/sub_commands/login.rs
+++ b/src/bin/ngit/sub_commands/login.rs
diff --git a/src/sub_commands/mod.rs b/src/bin/ngit/sub_commands/mod.rs
index 29a60f9..29a60f9 100644
--- a/src/sub_commands/mod.rs
+++ b/src/bin/ngit/sub_commands/mod.rs
diff --git a/src/sub_commands/pull.rs b/src/bin/ngit/sub_commands/pull.rs
index e33a744..e33a744 100644
--- a/src/sub_commands/pull.rs
+++ b/src/bin/ngit/sub_commands/pull.rs
diff --git a/src/sub_commands/push.rs b/src/bin/ngit/sub_commands/push.rs
index 7a82c7a..7a82c7a 100644
--- a/src/sub_commands/push.rs
+++ b/src/bin/ngit/sub_commands/push.rs
diff --git a/src/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs
index 3c4df9d..3c4df9d 100644
--- a/src/sub_commands/send.rs
+++ b/src/bin/ngit/sub_commands/send.rs
diff --git a/src/key_handling/mod.rs b/src/key_handling/mod.rs
deleted file mode 100644
index 81c4253..0000000
--- a/src/key_handling/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
1pub mod encryption;
diff --git a/src/cli_interactor.rs b/src/lib/cli_interactor.rs
index 4cf6357..4cf6357 100644
--- a/src/cli_interactor.rs
+++ b/src/lib/cli_interactor.rs
diff --git a/src/client.rs b/src/lib/client.rs
index abde217..abde217 100644
--- a/src/client.rs
+++ b/src/lib/client.rs
diff --git a/src/git.rs b/src/lib/git/mod.rs
index 5919667..5919667 100644
--- a/src/git.rs
+++ b/src/lib/git/mod.rs
diff --git a/src/key_handling/encryption.rs b/src/lib/login/key_encryption.rs
index 3841d50..3841d50 100644
--- a/src/key_handling/encryption.rs
+++ b/src/lib/login/key_encryption.rs
diff --git a/src/login.rs b/src/lib/login/mod.rs
index 19bb97c..19bb97c 100644
--- a/src/login.rs
+++ b/src/lib/login/mod.rs
diff --git a/src/config.rs b/src/lib/login/user.rs
index 547fe7e..547fe7e 100644
--- a/src/config.rs
+++ b/src/lib/login/user.rs
diff --git a/src/lib/mod.rs b/src/lib/mod.rs
new file mode 100644
index 0000000..61dfc49
--- /dev/null
+++ b/src/lib/mod.rs
@@ -0,0 +1,16 @@
1mod cli_interactor;
2mod client;
3mod config;
4mod git;
5mod key_handling;
6mod login;
7mod repo_ref;
8mod repo_state;
9
10pub use client;
11pub use config;
12pub use git;
13pub use key_handling;
14pub use login;
15pub use repo_ref;
16pub use repo_state;
diff --git a/src/repo_ref.rs b/src/lib/repo_ref.rs
index 0e57d96..0e57d96 100644
--- a/src/repo_ref.rs
+++ b/src/lib/repo_ref.rs
diff --git a/src/repo_state.rs b/src/lib/repo_state.rs
index a5cebab..a5cebab 100644
--- a/src/repo_state.rs
+++ b/src/lib/repo_state.rs