JS API Reference

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

NullStorageProvider

Methods

close

close(): Promise<void>

Close storage provider and release all resources.

Returns

Promise<void>

Implementation of

StorageProvider.close

Defined in

src/shared/storage/null.ts:15


init

init(): Promise<void>

Initialize storage provider.

Returns

Promise<void>

Implementation of

StorageProvider.init

Defined in

src/shared/storage/null.ts:19


publishData

publishData(src): Promise<string>

Return allocated resource URL from Yagna of data to be uploaded.

Parameters

NameType
srcUint8Array

Returns

Promise<string>

Implementation of

StorageProvider.publishData

Defined in

src/shared/storage/null.ts:24


publishFile

publishFile(src): Promise<string>

Return allocated resource URL from Yagna of a file to be uploaded.

Parameters

NameType
srcstring

Returns

Promise<string>

Implementation of

StorageProvider.publishFile

Defined in

src/shared/storage/null.ts:29


receiveFile

receiveFile(path): Promise<string>

Return allocated resource URL from Yagna of a file to be downloaded.

Parameters

NameType
pathstring

Returns

Promise<string>

Implementation of

StorageProvider.receiveFile

Defined in

src/shared/storage/null.ts:34


receiveData

receiveData(callback): Promise<string>

Return allocated resource URL from Yagna of a file to be downloaded.

Parameters

NameType
callbackStorageProviderDataCallback

Returns

Promise<string>

Implementation of

StorageProvider.receiveData

Defined in

src/shared/storage/null.ts:39


release

release(urls): Promise<void>

Release previously allocated resource URL from Yagna.

Parameters

NameType
urlsstring[]

Returns

Promise<void>

Implementation of

StorageProvider.release

Defined in

src/shared/storage/null.ts:44


isReady

isReady(): boolean

Tells if the storage provider is ready for use

Returns

boolean

Implementation of

StorageProvider.isReady

Defined in

src/shared/storage/null.ts:48

Was this helpful?