satellite/metainfo: add stream id when listing pending objects
Change-Id: Idcdffd70b82c0fe4f79635fc193604b66101ef76
This commit is contained in:
parent
1465539220
commit
05fe497a6f
2
go.mod
2
go.mod
@ -42,7 +42,7 @@ require (
|
||||
golang.org/x/sys v0.0.0-20200929083018-4d22bbb62b3c
|
||||
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
|
||||
google.golang.org/api v0.20.0 // indirect
|
||||
storj.io/common v0.0.0-20201117144309-e8c76d99e5a9
|
||||
storj.io/common v0.0.0-20201119120404-37756b80ef3b
|
||||
storj.io/drpc v0.0.16
|
||||
storj.io/monkit-jaeger v0.0.0-20200518165323-80778fc3f91b
|
||||
storj.io/private v0.0.0-20201026143115-bc926bfa3bca
|
||||
|
4
go.sum
4
go.sum
@ -906,8 +906,8 @@ storj.io/common v0.0.0-20200424175742-65ac59022f4f/go.mod h1:pZyXiIE7bGETIRXtfs0
|
||||
storj.io/common v0.0.0-20201026135900-1aaeec90670b/go.mod h1:GqdmNf3fLm2UZX/7Zr0BLFCJ4gFjgm6eHrk/fnmr5jQ=
|
||||
storj.io/common v0.0.0-20201106104920-372a344bdd45 h1:pv552R7MiRA8VLQC4qXczLjbl2Qb/MNyus2E9NBSXgI=
|
||||
storj.io/common v0.0.0-20201106104920-372a344bdd45/go.mod h1:ZkQZup2jpFZvvTgz+yPc7K4Vr4bBHM8AA66P57MZkjk=
|
||||
storj.io/common v0.0.0-20201117144309-e8c76d99e5a9 h1:JZL5+2p7r4056cTFNLK5LDJhhjkA9i5oTyI5QPmWHB4=
|
||||
storj.io/common v0.0.0-20201117144309-e8c76d99e5a9/go.mod h1:Cl1rpX3ZfVpOLw0Al6nRGwPbw2DwwXFF5J/63Nf4Sd8=
|
||||
storj.io/common v0.0.0-20201119120404-37756b80ef3b h1:tYz4nbxG7gbkZ1MTHKhrS/IDTOKXSCHunWEShWxvliI=
|
||||
storj.io/common v0.0.0-20201119120404-37756b80ef3b/go.mod h1:Cl1rpX3ZfVpOLw0Al6nRGwPbw2DwwXFF5J/63Nf4Sd8=
|
||||
storj.io/drpc v0.0.11/go.mod h1:TiFc2obNjL9/3isMW1Rpxjy8V9uE0B2HMeMFGiiI7Iw=
|
||||
storj.io/drpc v0.0.11/go.mod h1:TiFc2obNjL9/3isMW1Rpxjy8V9uE0B2HMeMFGiiI7Iw=
|
||||
storj.io/drpc v0.0.14 h1:GCBdymTt1BRw4oHmmUZZlxYXLVRxxYj6x3Ivide2J+I=
|
||||
|
@ -999,6 +999,22 @@ func (endpoint *Endpoint) ListObjects(ctx context.Context, req *pb.ObjectListReq
|
||||
return err
|
||||
}
|
||||
}
|
||||
// Add Stream ID to list items if listing is for pending objects.
|
||||
// The client requires the Stream ID to use in the MultipartInfo.
|
||||
if status == metabase.Pending {
|
||||
satStreamID, err := endpoint.packStreamID(ctx, &internalpb.StreamID{
|
||||
Bucket: req.Bucket,
|
||||
EncryptedPath: item.EncryptedPath,
|
||||
Version: item.Version,
|
||||
CreationDate: item.CreatedAt,
|
||||
ExpirationDate: item.ExpiresAt,
|
||||
StreamId: entry.StreamID[:],
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
item.StreamId = &satStreamID
|
||||
}
|
||||
resp.Items = append(resp.Items, item)
|
||||
}
|
||||
resp.More = it.Next(ctx, &entry)
|
||||
|
Loading…
Reference in New Issue
Block a user