318639e5bf
`apistatus` package provides types which implement build-in `error` interface. Add `error of type` pattern when documenting these errors in order to clarify how these errors should be handled (e.g. `errors.Is` is not good). Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
25 lines
714 B
Go
25 lines
714 B
Go
package blobstor
|
|
|
|
// GetSmallPrm groups the parameters of GetSmallPrm operation.
|
|
type GetSmallPrm struct {
|
|
address
|
|
rwBlobovniczaID
|
|
}
|
|
|
|
// GetSmallRes groups resulting values of GetSmall operation.
|
|
type GetSmallRes struct {
|
|
roObject
|
|
}
|
|
|
|
// GetSmall reads the object from blobovnicza of BLOB storage by address.
|
|
//
|
|
// If blobovnicza ID is not set or set to nil, BlobStor tries to get object
|
|
// from any blobovnicza.
|
|
//
|
|
// Returns any error encountered that
|
|
// did not allow to completely read the object.
|
|
//
|
|
// Returns an error of type apistatus.ObjectNotFound if requested object is missing in blobovnicza(s).
|
|
func (b *BlobStor) GetSmall(prm *GetSmallPrm) (*GetSmallRes, error) {
|
|
return b.blobovniczas.get(prm)
|
|
}
|