summary refs log tree commit diff stats
path: root/storage/storage.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-03-26 20:32:30 +0530
committerAndinus <andinus@nand.sh>2020-03-26 20:32:30 +0530
commit80c9e876b0ed1a5fb84e31cb06837466c006fa9e (patch)
tree2e797560370c1a0c37d22c46acb55e34dba39627 /storage/storage.go
parent221601b8ba64bad10d84f891d4e8dd7f40a6d799 (diff)
downloadperseus-80c9e876b0ed1a5fb84e31cb06837466c006fa9e.tar.gz
Add storage & sqlite3 package
Diffstat (limited to 'storage/storage.go')
-rw-r--r--storage/storage.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/storage/storage.go b/storage/storage.go
new file mode 100644
index 0000000..24f770d
--- /dev/null
+++ b/storage/storage.go
@@ -0,0 +1,17 @@
+package storage
+
+import (
+	"sync"
+
+	"tildegit.org/andinus/perseus/storage/sqlite3"
+)
+
+// Init initializes the database.
+func Init() *sqlite3.DB {
+	var db sqlite3.DB = sqlite3.DB{
+		Mu: new(sync.RWMutex),
+	}
+
+	sqlite3.Init(&db)
+	return &db
+}