Minor refactor to prepare for file version of donut

This commit is contained in:
Frederick F. Kautz IV
2015-03-14 11:07:54 -07:00
parent dffee21cde
commit 2f4b92eb8d
5 changed files with 24 additions and 70 deletions

View File

@@ -23,34 +23,17 @@ import (
"errors"
"io"
"strconv"
"time"
)
// Package Version
const Version = uint32(1)
// ObjectType is the type of object stored. It is either an Object or Multipart Object.
type ObjectType uint8
const (
// Object is a full object
Object ObjectType = iota
// MultipartObject is a collection of Objects uploaded separately that represent a large object.
MultipartObject
)
// ObjectMetadata contains information necessary to reconstruct the object and basic object metadata.
type ObjectMetadata struct {
Bucket string
Key string
ErasurePart uint16
EncodedPart uint8
ContentType string
Created time.Time
Length uint64
Md5 []byte
ObjectType ObjectType
}
// Write an encoded part to a writer