AsyncStoreApi
Store api container that manages connection and exposes asynchronous API.
Methods
AsyncStoreApi
Wraps existing thread api into async thread api. This constructor is meant to be used in advanced scenarios like object mocking and testing.
Params
storeApi
IStoreApi
Existing thread API.
connectionId
long
ID of user connection.
eventDispatcher
IEventDispatcher
Event dispatcher used as event source.
AsyncStoreApi
Creates a new instance of the store api over real privmx connection.
Params
connection
Connection
DisposeAsync
Disposes store api.
Returns
ValueTask
·
CreateStore
Creates a new Store in given Context.
Params
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.
containerPolicy
ContainerPolicy
Store policy.
token
CancellationToken
Cancellation token.
Returns
ValueTask<string>
·
Created Store ID.
UpdateStore
Updates an existing Store.
Params
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 regenerate a key for the Store.
containerPolicy
ContainerPolicy?
(optional) Store policy.
token
CancellationToken
Cancellation token.
Returns
ValueTask
·
DeleteStore
Deletes a Store by given Store ID.
Params
storeId
string
ID of the Store to delete.
token
CancellationToken
Cancellation token.
Returns
ValueTask
·
GetStore
Gets a single Store by given Store ID.
Params
storeId
string
ID of the store to get.
token
CancellationToken
Cancellation token.
Returns
ValueTask<PrivMX.Endpoint.Store.Models.Store>
·
Information about about the Store.
GetFile
Gets information about existing file.
Params
fileId
string
ID of the file to get.
token
CancellationToken
Cancellation token.
Returns
ValueTask<File>
·
Store file metadata.
ListStores
Gets a list of Stores in given Context.
Params
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.
ListFiles
Gets a list of files in given Store.storeIdID of the Store to get files from.pagingQueryList query parameters.tokenCancellation token.List of files.
Params
storeId
string
pagingQuery
PagingQuery
token
CancellationToken
Returns
ValueTask<PagingList<File>>
·
CreateFile
Creates a new file in a Store.
Params
storeId
string
ID of the Store to create the file in.
size
long
Size of the file.
publicMeta
byte[]
Public file meta_data.
privateMeta
byte[]
Private file meta_data.
fillValue
byte?
Optional value to fill empty space in file stream on close.
token
CancellationToken
Cancellation token.
Returns
async ValueTask<PrivmxFileStream>
·
Fixed size file stream that supports write operations.
DeleteFile
Deletes a file by given file ID.fileIdID of the Store to delete.tokenCancellation token.
Params
fileId
string
token
CancellationToken
Returns
ValueTask
·
OpenFileForWrite
Opens a file for write.
Params
fileId
string
ID of the file to update.
size
long
New file size.
publicMeta
byte[]
Public file meta data.>
privateMeta
byte[]
Private file meta data.
fillValue
byte?
Optional value to fill empty space in file stream on close.
token
CancellationToken
Cancellation token
Returns
async ValueTask<PrivmxFileStream>
·
Fixed size file stream that supports write operations.
OpenFileForRead
Opens a file for read.fileIdID of the file to read.tokenCancellation tokenFixed size readable stream that supports seek operation.
Params
fileId
string
token
CancellationToken
Returns
async ValueTask<PrivmxFileStream>
·
UpdateFileMetaAsync
Updates meta data of an existing file in a Store.fileIdID of the file to update.publicMetaPublic file meta_data.privateMetaPrivate file meta_data.tokenCancellation token.
Params
fileId
string
publicMeta
byte[]
privateMeta
byte[]
token
CancellationToken
Returns
ValueTask
·
GetStoreEvents
Gets store events.Stream of store events.
Returns
IObservable<StoreEvent>
·
GetFileEvents
Gets store file events.storeIdID of the tracked store.Stream of store file events.
Params
storeId
string
Returns
IObservable<StoreFileEvent>
·
Dispose
Disposes store api.
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.