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

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-25 19:08:16 +03:00 committed by Alex Vanin
parent 881f49814a
commit 7e91fffd39

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) {