summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go2
-rw-r--r--objectstore/objecstore.go11
2 files changed, 12 insertions, 1 deletions
diff --git a/main.go b/main.go
index 268c689..71f8d34 100644
--- a/main.go
+++ b/main.go
@@ -14,7 +14,7 @@ import (
)
type storehouse struct {
- objects *objectstore.MemObjectStore
+ objects objectstore.ObjectStore
}
func InitStorehouse() *storehouse {
diff --git a/objectstore/objecstore.go b/objectstore/objecstore.go
new file mode 100644
index 0000000..7509fad
--- /dev/null
+++ b/objectstore/objecstore.go
@@ -0,0 +1,11 @@
+// ObjectStore (backend) interface
+//
+// Licensed under CC0 1.0 Universal:
+// https://creativecommons.org/publicdomain/zero/1.0/legalcode
+package objectstore
+
+type ObjectStore interface {
+ CreateObject(bucketId string, objectId string, content string)
+ GetObject(bucketId string, objectId string) (string, error)
+ DeleteObject(bucketId string, objectId string) error
+}