[#13] neofs-node: Implement Object.Head executor

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
support/v0.27
Leonard Lyubich 2020-08-25 19:08:16 +03:00 committed by Alex Vanin
parent 881f49814a
commit 7e91fffd39
1 changed files with 12 additions and 2 deletions

View File

@ -78,8 +78,18 @@ func (*objectExecutor) Put(context.Context) (objectService.PutObjectBodyStreamer
return new(simplePutBodyStreamer), nil
}
func (*objectExecutor) Head(context.Context, *object.HeadRequestBody) (*object.HeadResponseBody, error) {
panic("implement me")
func (*objectExecutor) Head(_ context.Context, body *object.HeadRequestBody) (*object.HeadResponseBody, error) {
res := new(object.HeadResponseBody)
hdrPart := new(object.GetHeaderPartShort)
shHdr := new(object.ShortHeader)
hdrPart.SetShortHeader(shHdr)
shHdr.SetPayloadLength(100)
res.SetHeaderPart(hdrPart)
return res, nil
}
func (s *objectExecutor) Search(ctx context.Context, body *object.SearchRequestBody) (objectService.SearchObjectBodyStreamer, error) {