aboutsummaryrefslogtreecommitdiff
path: root/storage/storage.go
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2018-01-15 07:39:49 +0100
committerLaria Carolin Chabowski <laria@laria.me>2018-01-15 07:39:49 +0100
commit62eef384330f652edd17732240ae0d82685c0914 (patch)
tree1ebf60a5baada7e5bd32c44ed0bafbe264958ca9 /storage/storage.go
parentfc37a9d8e4e240a8fbf297919490c6df7e676d63 (diff)
downloadpetrific-62eef384330f652edd17732240ae0d82685c0914.tar.gz
petrific-62eef384330f652edd17732240ae0d82685c0914.tar.bz2
petrific-62eef384330f652edd17732240ae0d82685c0914.zip
Add command to restore index of a cloud storage
Diffstat (limited to 'storage/storage.go')
-rw-r--r--storage/storage.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/storage.go b/storage/storage.go
index 176e75d..eb71447 100644
--- a/storage/storage.go
+++ b/storage/storage.go
@@ -3,6 +3,7 @@ package storage
import (
"bytes"
"code.laria.me/petrific/config"
+ "code.laria.me/petrific/logging"
"code.laria.me/petrific/objects"
"errors"
"fmt"
@@ -14,12 +15,16 @@ var (
ObjectNotFound = errors.New("Object not found")
)
+type StorageSubcmd func(args []string, log *logging.Log, conf config.Config) int
+
type Storage interface {
Get(id objects.ObjectId) ([]byte, error)
Has(id objects.ObjectId) (bool, error)
Set(id objects.ObjectId, typ objects.ObjectType, raw []byte) error
List(typ objects.ObjectType) ([]objects.ObjectId, error)
+ Subcmds() map[string]StorageSubcmd
+
Close() error
}