From 62eef384330f652edd17732240ae0d82685c0914 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Mon, 15 Jan 2018 07:39:49 +0100 Subject: Add command to restore index of a cloud storage --- storage/storage.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'storage/storage.go') 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 } -- cgit v1.2.3-54-g00ecf