From 3c0ef270f47aac36a0f57ad80e8b2ab9d57c4925 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 25 Nov 2020 12:40:41 +0300 Subject: [PATCH] [#211] blobstor: Define Exists operation Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/blobstor/exists.go | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pkg/local_object_storage/blobstor/exists.go diff --git a/pkg/local_object_storage/blobstor/exists.go b/pkg/local_object_storage/blobstor/exists.go new file mode 100644 index 00000000..b790ac92 --- /dev/null +++ b/pkg/local_object_storage/blobstor/exists.go @@ -0,0 +1,24 @@ +package blobstor + +// ExistsPrm groups the parameters of Exists operation. +type ExistsPrm struct { + address +} + +// ExistsRes groups resulting values of Exists operation. +type ExistsRes struct { + exists bool +} + +// Exists returns the fact that the object is in BLOB storage. +func (r ExistsRes) Exists() bool { + return r.exists +} + +// Exists checks if object is presented in BLOB storage. +// +// Returns any error encountered that did not allow +// to completely check object existence. +func (b *BlobStor) Exists(prm *ExistsPrm) (*ExistsRes, error) { + panic("implement me") +}