[#13] services/object: Implement Delete handlers

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-25 19:12:36 +03:00 committed by Alex Vanin
parent 7e91fffd39
commit 7a6b62c552
2 changed files with 25 additions and 4 deletions

View file

@ -167,8 +167,17 @@ func (s *executorSvc) Search(ctx context.Context, req *object.SearchRequest) (ob
}, nil
}
func (*executorSvc) Delete(context.Context, *object.DeleteRequest) (*object.DeleteResponse, error) {
panic("implement me")
func (s *executorSvc) Delete(ctx context.Context, req *object.DeleteRequest) (*object.DeleteResponse, error) {
respBody, err := s.exec.Delete(ctx, req.GetBody())
if err != nil {
return nil, errors.Wrap(err, "could not execute Delete request")
}
resp := new(object.DeleteResponse)
resp.SetBody(respBody)
resp.SetMetaHeader(s.metaHeader)
return resp, nil
}
func (s *rangeStreamer) Recv() (*object.GetRangeResponse, error) {