forked from TrueCloudLab/frostfs-api-go
[#218] Support SplitInfo structure
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
707a0bcb35
commit
1fdeca84e1
11 changed files with 832 additions and 410 deletions
|
@ -75,6 +75,14 @@ type Object struct {
|
|||
payload []byte
|
||||
}
|
||||
|
||||
type SplitInfo struct {
|
||||
splitID []byte
|
||||
|
||||
lastPart *refs.ObjectID
|
||||
|
||||
link *refs.ObjectID
|
||||
}
|
||||
|
||||
type GetRequestBody struct {
|
||||
addr *refs.Address
|
||||
|
||||
|
@ -634,6 +642,50 @@ func (o *Object) SetPayload(v []byte) {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *SplitInfo) GetSplitID() []byte {
|
||||
if s.splitID != nil {
|
||||
return s.splitID
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *SplitInfo) SetSplitID(v []byte) {
|
||||
if s != nil {
|
||||
s.splitID = v
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SplitInfo) GetLastPart() *refs.ObjectID {
|
||||
if s != nil {
|
||||
return s.lastPart
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *SplitInfo) SetLastPart(v *refs.ObjectID) {
|
||||
if s != nil {
|
||||
s.lastPart = v
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SplitInfo) GetLink() *refs.ObjectID {
|
||||
if s != nil {
|
||||
return s.link
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *SplitInfo) SetLink(v *refs.ObjectID) {
|
||||
if s != nil {
|
||||
s.link = v
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SplitInfo) getObjectPart() {} // implement interface to be one of response body
|
||||
|
||||
func (r *GetRequestBody) GetAddress() *refs.Address {
|
||||
if r != nil {
|
||||
return r.addr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue