StoreApiExtensions
Asynchronous extensions for dtore API.
Static Methods
CreateStoreAsync
Creates a new Store in given Context.
Params
api
this IStoreApi
Extended object.
contextId
string
ID of the Context to create the Store in.
users
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access to the created Store.
managers
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access (and management rights) to the created Store.
publicMeta
byte[]
Public (unencrypted) metadata.
privateMeta
byte[]
Private (encrypted) metadata.
policies
ContainerPolicy
(optional) Store policy.
token
CancellationToken
Cancellation token.
Returns
ValueTask<string>
·
Created Store ID.
UpdateStoreAsync
Updates an existing Store.
Params
api
this IStoreApi
Extended object.
storeId
string
ID of the Store to update.
users
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access to the created Store.
managers
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access (and management rights) to the created Store.
publicMeta
byte[]
Public (unencrypted) metadata.
privateMeta
byte[]
Private (encrypted) metadata.
version
long
Current version of the updated Store.
force
bool
Force update (without checking version).
forceGenerateNewKey
bool
Force to renenerate a key for the Store.
policies
ContainerPolicy?
(optional) Store policy.
token
CancellationToken
Cancellation token.
Returns
ValueTask
·
DeleteStoreAsync
Deletes a Store by given Store ID.
Params
api
this IStoreApi
Extended object.
storeId
string
ID of the Store to delete.
token
CancellationToken
Cancellation token.
Returns
ValueTask
·
GetStoreAsync
Gets a single Store by given Store ID.
Params
api
this IStoreApi
Extended object.
storeId
string
ID of the Store to get.
token
CancellationToken
Cancellation token
Returns
ValueTask<PrivMX.Endpoint.Store.Models.Store>
·
Information about about the Store.
ListStoresAsync
Gets a list of Stores in given Context.
Params
api
this IStoreApi
Extended object.
contextId
string
ID of the Context to get the Stores from.
pagingQuery
PagingQuery
List query parameters.
token
CancellationToken
Cancellation token.
Returns
ValueTask<PagingList<PrivMX.Endpoint.Store.Models.Store>>
·
List of Stores.
CreateFileAsync
Creates a new file in a Store.
Params
api
this IStoreApi
Extended object.
storeId
string
ID of the Store to create the file in.
publicMeta
byte[]
Public file meta_data.
privateMeta
byte[]
Private file meta_data.
size
long
Size of the file.
token
CancellationToken
Cancellation token.
Returns
ValueTask<long>
·
Handle to write data.
UpdateFileAsync
Updates an existing file in a Store.
Params
api
this IStoreApi
Extended object.
fileId
string
ID of the file to update.
publicMeta
byte[]
Public file meta_data.
privateMeta
byte[]
Private file meta_data.
size
long
Size of the file.
token
CancellationToken
Cancellation token.
Returns
ValueTask<long>
·
Handle to write file data.
UpdateFileMetaAsync
Updates meta data of an existing file in a Store.
Params
api
this IStoreApi
Extended object.
fileId
string
ID of the file to update.
publicMeta
byte[]
Public file meta_data.
privateMeta
byte[]
Private file meta_data.
token
CancellationToken
Cancellation token
Returns
ValueTask
·
WriteToFileAsync
Writes a file data.
Params
api
this IStoreApi
fileHandle
long
Handle to write file data.
dataChunk
byte[]
File data chunk.
token
CancellationToken
Returns
ValueTask
·
DeleteFileAsync
Deletes a file by given ID.
Params
api
this IStoreApi
Extended object.
fileId
string
ID of the file to delete.
token
CancellationToken
Cancellation token.
Returns
ValueTask
·
GetFileAsync
Deletes a file by given ID.
Params
api
this IStoreApi
Extended object.
fileId
string
ID of the file to delete.
token
CancellationToken
Cancellation token.
Returns
ValueTask<File>
·
ListFilesAsync
Gets a list of files in given Store.
Params
api
this IStoreApi
Extended object.
storeId
string
ID of the Store to get files from.
pagingQuery
PagingQuery
List query parameters.
token
CancellationToken
Cancellation token.
Returns
ValueTask<PagingList<File>>
·
List of files.
OpenFileAsync
Opens a file to read.
Params
api
this IStoreApi
Extended object.
fileId
string
ID of the file to read.
token
CancellationToken
Cancellation token.
Returns
ValueTask<long>
·
Handle to read file data.
ReadFromFileAsync
Reads file data.
Params
api
this IStoreApi
Extended object.
fileHandle
long
Handle to write file data.
length
long
Size of data to read.
token
CancellationToken
Cancellation token.
Returns
ValueTask<byte[]>
·
File data chunk.
SeekInFileAsync
Moves read cursor.
Params
api
this IStoreApi
Extended object.
fileHandle
long
Handle to write file data.
position
long
New cursor position.
token
CancellationToken
Cancellation token
Returns
ValueTask
·
CloseFileAsync
Closes the file handle.
Params
api
this IStoreApi
Extended object.
fileHandle
long
Handle to read/write file data.
token
CancellationToken
Cancellation token.
Returns
ValueTask<string>
·
ID of closed file.
SubscribeForStoreEventsAsync
Subscribes for the Store module main events.
Params
api
this IStoreApi
token
CancellationToken
Returns
ValueTask
·
UnsubscribeFromStoreEventsAsync
Unsubscribes from the Store module main events.
Params
api
this IStoreApi
token
CancellationToken
Returns
ValueTask
·
SubscribeForFileEventsAsync
Subscribes for the events in given Store.
Params
api
this IStoreApi
Extended object.
storeId
string
ID of the store to subscribe to.
token
CancellationToken
Cancellation token.
Returns
ValueTask
·
UnsubscribeFromFileEventsAsync
Unsubscribes from the events in given Store.
Params
api
this IStoreApi
Extended object
storeId
string
ID of the store to unsubscribe from.
token
CancellationToken
Cancellation token.
Returns
ValueTask
·
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.