frostfs-node/pkg/local_object_storage/blobstor/delete_small.go
Leonard Lyubich 70ffdf3478 [#1247] object: Return NOT_FOUND and ALREADY_REMOVED statuses
Replace `ErrNotFound`/`ErrAlreadyRemoved` error from
`pkg/core/object` package with `ObjectNotFound`/`ObjectAlreadyRemoved`
one from `apistatus` package. These errors are returned by storage
node's server as NeoFS API statuses.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-17 16:34:00 +03:00

23 lines
699 B
Go

package blobstor
// DeleteSmallPrm groups the parameters of DeleteSmall operation.
type DeleteSmallPrm struct {
address
rwBlobovniczaID
}
// DeleteSmallRes groups resulting values of DeleteSmall operation.
type DeleteSmallRes struct{}
// DeleteSmall removes object from blobovnicza of BLOB storage.
//
// If blobovnicza ID is not set or set to nil, BlobStor tries to
// find and remove object from any blobovnicza.
//
// Returns any error encountered that did not allow
// to completely remove the object.
//
// Returns apistatus.ObjectNotFound if there is no object to delete.
func (b *BlobStor) DeleteSmall(prm *DeleteSmallPrm) (*DeleteSmallRes, error) {
return b.blobovniczas.delete(prm)
}