aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraxtloss <axtlos@getcryst.al>2024-01-27 19:07:09 +0100
committeraxtloss <axtlos@getcryst.al>2024-01-27 19:07:09 +0100
commit158e9d6eb8a74bc6ce3c3f2a9709de081568dc02 (patch)
tree607a25db5c5764fe7f10a746aee1a4e9420e8d81 /src
parent1b50046a214d81fe98c94a1220f7cbc1eeac669b (diff)
downloadfsverify-158e9d6eb8a74bc6ce3c3f2a9709de081568dc02.tar.gz
fsverify-158e9d6eb8a74bc6ce3c3f2a9709de081568dc02.tar.bz2
Add go project
Signed-off-by: axtloss <axtlos@getcryst.al>
Diffstat (limited to 'src')
-rw-r--r--src/core/mod.rs1
-rw-r--r--src/core/storage.rs36
-rw-r--r--src/main.rs5
3 files changed, 0 insertions, 42 deletions
diff --git a/src/core/mod.rs b/src/core/mod.rs
deleted file mode 100644
index e626ba5..0000000
--- a/src/core/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub mod storage; \ No newline at end of file
diff --git a/src/core/storage.rs b/src/core/storage.rs
deleted file mode 100644
index a4bb1bb..0000000
--- a/src/core/storage.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-
-use structsy::{Structsy, StructsyError, StructsyTx};
-use structsy_derive::{Persistent, queries};
-
-#[derive(Persistent)]
-struct DirectoryNode {
- dirname: string,
- path: string,
- files: Vec<FileNode>
-}
-
-#[derive(PersistentEmbedded)]
-struct FileNode {
- filename: string,
- path: string,
- hash: string,
- combined_hash: string,
-}
-#[queries(MyData)]
-trait FileNode {
- fn search(self, name:&str) -> Self;
-}
-
-pub fn open_db(path: string) -> Result<Structsy, StructsyError> {
- let db = Structsy::open(path)?;
- db.define::<DirectoryNode>()?
-}
-
-
-pub fn add(dir: DirectoryNode) -> Result<(), StructsyError> {
- let db = open_db("my_db.db")?;
- let mut tx = db.begin()?;
- tx.insert(&dir)?;
- tx.commit()?;
- Ok(())
-} \ No newline at end of file
diff --git a/src/main.rs b/src/main.rs
deleted file mode 100644
index bcab8e7..0000000
--- a/src/main.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-mod core;
-
-fn main() {
-
-} \ No newline at end of file