[#1559] metabase: Remove public functions

Reduce public interface of this package. Later each result will contain
an additional status, so it makes more sense to use the same functions
and result processing everywhere.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-12 17:42:55 +03:00 committed by fyrchik
parent 30c7925b3c
commit f58234aa2f
31 changed files with 234 additions and 247 deletions

View file

@ -35,21 +35,6 @@ func (p ExistsRes) Exists() bool {
return p.exists
}
// Exists checks if object is presented in DB.
//
// See DB.Exists docs.
func Exists(db *DB, addr oid.Address) (bool, error) {
var existsPrm ExistsPrm
existsPrm.WithAddress(addr)
r, err := db.Exists(existsPrm)
if err != nil {
return false, err
}
return r.Exists(), nil
}
// Exists returns ErrAlreadyRemoved if addr was marked as removed. Otherwise it
// returns true if addr is in primary index or false if it is not.
//