summaryrefslogtreecommitdiffstats
path: root/libimagtag
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-02-04 14:01:33 +0100
committerMatthias Beyer <mail@beyermatthias.de>2016-02-14 19:34:01 +0100
commitfd204ee05e6de5806ab4ae01819d8bcd52f981fa (patch)
tree3028a574c365a329124c268093d0961c34ed731b /libimagtag
parent38c492c36223dd0d06ea2541bc3aa9fa0ef1fe7f (diff)
Add initial module structure
Diffstat (limited to 'libimagtag')
-rw-r--r--libimagtag/src/add.rs0
-rw-r--r--libimagtag/src/check.rs0
-rw-r--r--libimagtag/src/error.rs0
-rw-r--r--libimagtag/src/lib.rs10
-rw-r--r--libimagtag/src/remove.rs0
-rw-r--r--libimagtag/src/result.rs0
-rw-r--r--libimagtag/src/tag.rs1
-rw-r--r--libimagtag/src/util.rs5
8 files changed, 16 insertions, 0 deletions
diff --git a/libimagtag/src/add.rs b/libimagtag/src/add.rs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/libimagtag/src/add.rs
diff --git a/libimagtag/src/check.rs b/libimagtag/src/check.rs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/libimagtag/src/check.rs
diff --git a/libimagtag/src/error.rs b/libimagtag/src/error.rs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/libimagtag/src/error.rs
diff --git a/libimagtag/src/lib.rs b/libimagtag/src/lib.rs
index 029dc609..252f6f68 100644
--- a/libimagtag/src/lib.rs
+++ b/libimagtag/src/lib.rs
@@ -1,2 +1,12 @@
extern crate regex;
extern crate toml;
+
+extern crate libimagstore;
+
+pub mod add;
+pub mod check;
+pub mod error;
+pub mod remove;
+pub mod result;
+pub mod tag;
+pub mod util;
diff --git a/libimagtag/src/remove.rs b/libimagtag/src/remove.rs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/libimagtag/src/remove.rs
diff --git a/libimagtag/src/result.rs b/libimagtag/src/result.rs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/libimagtag/src/result.rs
diff --git a/libimagtag/src/tag.rs b/libimagtag/src/tag.rs
new file mode 100644
index 00000000..cba2322e
--- /dev/null
+++ b/libimagtag/src/tag.rs
@@ -0,0 +1 @@
+pub type Tag = String;
diff --git a/libimagtag/src/util.rs b/libimagtag/src/util.rs
new file mode 100644
index 00000000..caa32539
--- /dev/null
+++ b/libimagtag/src/util.rs
@@ -0,0 +1,5 @@
+use regex::Regex;
+
+pub fn is_tag(s: &String) -> bool {
+ Regex::new("^[a-zA-Z]([a-zA-Z0-9_-]*)$").unwrap().captures(&s[..]).is_some()
+}