Class BlobStorageGrpc
- Namespace
- IdeaStatiCa.Plugin.Grpc
- Assembly
- IdeaStatiCa.Plugin.dll
public class BlobStorageGrpc : IBlobStorage
Inheritance
Implements
-
IBlobStorage
Inherited Members
Constructors
BlobStorageGrpc(IGrpcBlobStorageClient, string)
public BlobStorageGrpc(IGrpcBlobStorageClient grpcBlobStorageClient, string blobStorageId)
Parameters
grpcBlobStorageClient
IGrpcBlobStorageClientblobStorageId
string
Methods
Delete(string)
Deletes blob with contentId
identificator.
public void Delete(string contentId)
Parameters
contentId
string-
Uniqe blob identificator
Exist(string)
Tells whether blob with contentId
identificator exists or not.
public bool Exist(string contentId)
Parameters
contentId
string-
Uniqe blob identificator
Returns
- bool
-
Whether the blob with contentId identificator exists or not
GetEntries()
The collection of relative paths of entries that are currently in the storage with excluding the .lock files
public IReadOnlyCollection<string> GetEntries()
Returns
- IReadOnlyCollection<string>
-
The collection of relative paths of entries that are currently in the storage, while the .lock files are excluded
Init(string)
Initialize blob storage.
public void Init(string basePath)
Parameters
basePath
string-
Base path to storage.
Read(string)
Read blob with contentId
identificator from the storage into the stream. Client have to DISPOSE stream when it is no longer needed.
public Stream Read(string contentId)
Parameters
contentId
string-
Uniqe blob identificator
Returns
- Stream
-
Readed blob as stream. Client have to dispose stream.
Write(Stream, string)
Save content
blob with contentId
identificator to the storage.
public void Write(Stream content, string contentId)