forked from TrueCloudLab/frostfs-api-go
[#226] v2/object: Add tombstone field to DeleteResponseBody
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
c064760f5d
commit
4567986682
5 changed files with 61 additions and 6 deletions
|
@ -70,6 +70,8 @@ const (
|
|||
|
||||
deleteReqBodyAddressField = 1
|
||||
|
||||
deleteRespBodyTombstoneFNum = 1
|
||||
|
||||
headReqBodyAddressField = 1
|
||||
headReqBodyMainFlagField = 2
|
||||
headReqBodyRawFlagField = 3
|
||||
|
@ -953,11 +955,30 @@ func (r *DeleteRequestBody) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (r *DeleteResponseBody) StableMarshal(buf []byte) ([]byte, error) {
|
||||
return nil, nil
|
||||
if r == nil {
|
||||
return []byte{}, nil
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, r.StableSize())
|
||||
}
|
||||
|
||||
_, err := proto.NestedStructureMarshal(deleteRespBodyTombstoneFNum, buf, r.tombstone)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return buf, nil
|
||||
}
|
||||
|
||||
func (r *DeleteResponseBody) StableSize() (size int) {
|
||||
return 0
|
||||
if r == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.NestedStructureSize(deleteRespBodyTombstoneFNum, r.tombstone)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (r *HeadRequestBody) StableMarshal(buf []byte) ([]byte, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue