satellite/metainfo: add PlainOffset to SegmentDownloadResponse

Change-Id: Ib68f2fd0ad86556f443a01a514243247dc7989a3
This commit is contained in:
Egon Elbre 2021-04-06 14:52:59 +03:00
parent 288a7e8ee7
commit 17817d84e9
3 changed files with 5 additions and 3 deletions

2
go.mod
View File

@ -48,7 +48,7 @@ require (
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e
google.golang.org/api v0.20.0 // indirect google.golang.org/api v0.20.0 // indirect
gopkg.in/segmentio/analytics-go.v3 v3.1.0 gopkg.in/segmentio/analytics-go.v3 v3.1.0
storj.io/common v0.0.0-20210405215524-47ec02e3138f storj.io/common v0.0.0-20210406101054-49a98aa478e8
storj.io/drpc v0.0.20 storj.io/drpc v0.0.20
storj.io/monkit-jaeger v0.0.0-20210225162224-66fb37637bf6 storj.io/monkit-jaeger v0.0.0-20210225162224-66fb37637bf6
storj.io/private v0.0.0-20210225200021-48b617cbe817 storj.io/private v0.0.0-20210225200021-48b617cbe817

4
go.sum
View File

@ -942,8 +942,8 @@ sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3
storj.io/common v0.0.0-20200424175742-65ac59022f4f/go.mod h1:pZyXiIE7bGETIRXtfs0nICqMwp7PM8HqnDuyUeldNA0= storj.io/common v0.0.0-20200424175742-65ac59022f4f/go.mod h1:pZyXiIE7bGETIRXtfs0nICqMwp7PM8HqnDuyUeldNA0=
storj.io/common v0.0.0-20201026135900-1aaeec90670b/go.mod h1:GqdmNf3fLm2UZX/7Zr0BLFCJ4gFjgm6eHrk/fnmr5jQ= storj.io/common v0.0.0-20201026135900-1aaeec90670b/go.mod h1:GqdmNf3fLm2UZX/7Zr0BLFCJ4gFjgm6eHrk/fnmr5jQ=
storj.io/common v0.0.0-20210324105846-0a39fd4f6781/go.mod h1:Udjm4roy/lhL7PHDWlNVhuVxlohcPiyHMeuigw94SDE= storj.io/common v0.0.0-20210324105846-0a39fd4f6781/go.mod h1:Udjm4roy/lhL7PHDWlNVhuVxlohcPiyHMeuigw94SDE=
storj.io/common v0.0.0-20210405215524-47ec02e3138f h1:im+7+C4tzfxMUBDmJoTD9tJYkIzVX9zmeyUR5Fy2r/c= storj.io/common v0.0.0-20210406101054-49a98aa478e8 h1:qgPdL5Otc4elatVobjfoasj+8cyy5xjNAcGIQIUGnIs=
storj.io/common v0.0.0-20210405215524-47ec02e3138f/go.mod h1:Udjm4roy/lhL7PHDWlNVhuVxlohcPiyHMeuigw94SDE= storj.io/common v0.0.0-20210406101054-49a98aa478e8/go.mod h1:Udjm4roy/lhL7PHDWlNVhuVxlohcPiyHMeuigw94SDE=
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/go.mod h1:82nfl+6YwRwF6UG31cEWWUqv/FaKvP5SGqUvoqTxCMA= storj.io/drpc v0.0.14/go.mod h1:82nfl+6YwRwF6UG31cEWWUqv/FaKvP5SGqUvoqTxCMA=
storj.io/drpc v0.0.20 h1:nzOxsetLi0fJ8xCL92LPlYL0B6iYdDDk1Cpdbn0/r9Y= storj.io/drpc v0.0.20 h1:nzOxsetLi0fJ8xCL92LPlYL0B6iYdDDk1Cpdbn0/r9Y=

View File

@ -1796,6 +1796,7 @@ func (endpoint *Endpoint) DownloadSegment(ctx context.Context, req *pb.SegmentDo
mon.Meter("req_get_inline").Mark(1) mon.Meter("req_get_inline").Mark(1)
return &pb.SegmentDownloadResponse{ return &pb.SegmentDownloadResponse{
PlainOffset: segment.PlainOffset,
SegmentSize: int64(segment.EncryptedSize), SegmentSize: int64(segment.EncryptedSize),
EncryptedInlineData: segment.InlineData, EncryptedInlineData: segment.InlineData,
@ -1836,6 +1837,7 @@ func (endpoint *Endpoint) DownloadSegment(ctx context.Context, req *pb.SegmentDo
return &pb.SegmentDownloadResponse{ return &pb.SegmentDownloadResponse{
AddressedLimits: limits, AddressedLimits: limits,
PrivateKey: privateKey, PrivateKey: privateKey,
PlainOffset: segment.PlainOffset,
SegmentSize: int64(segment.EncryptedSize), SegmentSize: int64(segment.EncryptedSize),
EncryptedKeyNonce: encryptedKeyNonce, EncryptedKeyNonce: encryptedKeyNonce,