Interface: StorageProvider
storage/provider.StorageProvider
Implemented by
Table of contents
Methods
Methods
init
▸ init(): Promise
<void
>
Initialize storage provider.
Returns
Promise
<void
>
Defined in
close
▸ close(): Promise
<void
>
Close storage provider and release all resources.
Returns
Promise
<void
>
Defined in
receiveFile
▸ receiveFile(destPath
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be downloaded.
Parameters
Name | Type |
---|---|
destPath | string |
Returns
Promise
<string
>
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
>
Defined in
publishFile
▸ publishFile(srcPath
): Promise
<string
>
Return allocated resource URL from Yagna of a file to be uploaded.
Parameters
Name | Type |
---|---|
srcPath | string |
Returns
Promise
<string
>
Defined in
publishData
▸ publishData(data
): Promise
<string
>
Return allocated resource URL from Yagna of data to be uploaded.
Parameters
Name | Type |
---|---|
data | Uint8Array |
Returns
Promise
<string
>
Defined in
release
▸ release(urls
): Promise
<void
>
Release previously allocated resource URL from Yagna.
Parameters
Name | Type |
---|---|
urls | string [] |
Returns
Promise
<void
>