forked from TrueCloudLab/frostfs-node
[#235] object/head: Support raw flag in service
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
1d23483828
commit
397d912e19
5 changed files with 33 additions and 3 deletions
|
@ -15,7 +15,8 @@ func toPrm(req *objectV2.HeadRequest) *headsvc.Prm {
|
|||
object.NewAddressFromV2(body.GetAddress()),
|
||||
).
|
||||
Short(body.GetMainOnly()).
|
||||
WithCommonPrm(util.CommonPrmFromV2(req))
|
||||
WithCommonPrm(util.CommonPrmFromV2(req)).
|
||||
WithRaw(body.GetRaw())
|
||||
}
|
||||
|
||||
func fromResponse(r *headsvc.Response, short bool) *objectV2.HeadResponse {
|
||||
|
@ -55,3 +56,14 @@ func shortPartFromResponse(r *headsvc.Response) objectV2.GetHeaderPart {
|
|||
|
||||
return sh
|
||||
}
|
||||
|
||||
func splitInfoResponse(info *object.SplitInfo) *objectV2.HeadResponse {
|
||||
resp := new(objectV2.HeadResponse)
|
||||
|
||||
body := new(objectV2.HeadResponseBody)
|
||||
resp.SetBody(body)
|
||||
|
||||
body.SetHeaderPart(info.ToV2())
|
||||
|
||||
return resp
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue