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 --- objects/object.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'objects') diff --git a/objects/object.go b/objects/object.go index f9907f2..08525a9 100644 --- a/objects/object.go +++ b/objects/object.go @@ -23,6 +23,15 @@ var AllObjectTypes = []ObjectType{ OTSnapshot, } +func (ot ObjectType) IsKnown() bool { + for _, t := range AllObjectTypes { + if t == ot { + return true + } + } + return false +} + // RawObject describes a serialized object plus it's type header. This is the content that will be saved. // It is serialized as the type (ObjectType), a space byte, the size of the payload in bytes (encoded as decimal ASCII number), a newline ('\n') character and the payload. // The encoding of the payload depends on the type. -- cgit v1.2.3-70-g09d2