forked from TrueCloudLab/frostfs-api-go
container: Support new BasicACL
field
This commit is contained in:
parent
9f4636618f
commit
2fb36f8588
3 changed files with 9 additions and 37 deletions
|
@ -31,9 +31,11 @@ func (m *PutRequest) PrepareData() ([]byte, error) {
|
|||
err error
|
||||
buf = new(bytes.Buffer)
|
||||
capBytes = make([]byte, 8)
|
||||
aclBytes = make([]byte, 4)
|
||||
)
|
||||
|
||||
binary.BigEndian.PutUint64(capBytes, m.Capacity)
|
||||
binary.BigEndian.PutUint32(capBytes, m.BasicACL)
|
||||
|
||||
if _, err = buf.Write(m.MessageID.Bytes()); err != nil {
|
||||
return nil, errors.Wrap(err, "could not write message id")
|
||||
|
@ -45,6 +47,8 @@ func (m *PutRequest) PrepareData() ([]byte, error) {
|
|||
return nil, errors.Wrap(err, "could not marshal placement")
|
||||
} else if _, err = buf.Write(data); err != nil {
|
||||
return nil, errors.Wrap(err, "could not write placement")
|
||||
} else if _, err = buf.Write(aclBytes); err != nil {
|
||||
return nil, errors.Wrap(err, "could not write basic acl")
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue