aboutsummaryrefslogtreecommitdiff
path: root/objects/object.go
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2017-10-03 14:59:45 +0200
committerLaria Carolin Chabowski <laria@laria.me>2017-10-03 15:01:38 +0200
commit4de510778b6e55a2238374834d00b03726da76d4 (patch)
tree7b2d8b8f4db5d0bc2b81c8dfb31921fa59d45c6d /objects/object.go
parentdb0c023fd0d756912c3f575c6ac65e99fda573cc (diff)
downloadpetrific-4de510778b6e55a2238374834d00b03726da76d4.tar.gz
petrific-4de510778b6e55a2238374834d00b03726da76d4.tar.bz2
petrific-4de510778b6e55a2238374834d00b03726da76d4.zip
Documentation
Diffstat (limited to 'objects/object.go')
-rw-r--r--objects/object.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/objects/object.go b/objects/object.go
index 1bc9dbf..f9907f2 100644
--- a/objects/object.go
+++ b/objects/object.go
@@ -23,6 +23,9 @@ var AllObjectTypes = []ObjectType{
OTSnapshot,
}
+// 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.
type RawObject struct {
Type ObjectType
Payload []byte