[#142] Fix multipart-objects download
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
This commit is contained in:
parent
7e80f0cce6
commit
ea38b4e6c8
16 changed files with 761 additions and 197 deletions
41
internal/data/object.go
Normal file
41
internal/data/object.go
Normal file
|
@ -0,0 +1,41 @@
|
|||
package data
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
type (
|
||||
ObjectInfo struct {
|
||||
ID oid.ID
|
||||
CID cid.ID
|
||||
|
||||
Bucket string
|
||||
Name string
|
||||
Size uint64
|
||||
Headers map[string]string
|
||||
}
|
||||
|
||||
// PartInfo is upload information about part.
|
||||
PartInfo struct {
|
||||
Key string `json:"key"`
|
||||
UploadID string `json:"uploadId"`
|
||||
Number int `json:"number"`
|
||||
OID oid.ID `json:"oid"`
|
||||
Size uint64 `json:"size"`
|
||||
ETag string `json:"etag"`
|
||||
MD5 string `json:"md5"`
|
||||
Created time.Time `json:"created"`
|
||||
}
|
||||
)
|
||||
|
||||
// Address returns object address.
|
||||
func (o *ObjectInfo) Address() oid.Address {
|
||||
var addr oid.Address
|
||||
addr.SetContainer(o.CID)
|
||||
addr.SetObject(o.ID)
|
||||
|
||||
return addr
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue