Class: NullStorageProvider
shared/storage/null.NullStorageProvider
Null Storage Provider.
Blocks all storage operations. Any attempt to use storage will result in an error.
This will be the default storage provider if no default storage provider is available for the platform the SDK is running on.
Implements
Table of contents
Constructors
Methods
Constructors
constructor
• new NullStorageProvider(): NullStorageProvider
Returns
Methods
close
▸ close(): Promise
<void
>
Close storage provider and release all resources.
Returns
Promise
<void
>
Implementation of
Defined in
init
▸ init(): Promise
<void
>
Initialize storage provider.
Returns
Promise
<void
>
Implementation of
Defined in
publishData
▸ publishData(src
): Promise
<string
>
Return allocated resource URL from Yagna of data to be uploaded.
Parameters
Name | Type |
---|---|
src | Uint8Array |
Returns
Promise
<string
>
Implementation of
Defined in
publishFile
▸ publishFile(src
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be uploaded.
Parameters
Name | Type |
---|---|
src | string |
Returns
Promise
<string
>
Implementation of
Defined in
receiveFile
▸ receiveFile(path
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be downloaded.
Parameters
Name | Type |
---|---|
path | string |
Returns
Promise
<string
>
Implementation of
Defined in
receiveData
▸ receiveData(callback
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be downloaded.
Parameters
Name | Type |
---|---|
callback | StorageProviderDataCallback |
Returns
Promise
<string
>
Implementation of
Defined in
release
▸ release(urls
): Promise
<void
>
Release previously allocated resource URL from Yagna.
Parameters
Name | Type |
---|---|
urls | string [] |
Returns
Promise
<void
>
Implementation of
Defined in
isReady
▸ isReady(): boolean
Tells if the storage provider is ready for use
Returns
boolean
Implementation of
Defined in
Was this helpful?